Skip to content

Commit ec00be9

Browse files
authored
Add min_access_level option to group search. (#605)
1 parent c81adf7 commit ec00be9

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/Api/Groups.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ class Groups extends AbstractApi
1212
/**
1313
* @param array $parameters {
1414
*
15-
* @var int[] $skip_groups skip the group IDs passes
16-
* @var bool $all_available show all the groups you have access to
17-
* @var string $search return list of authorized groups matching the search criteria
18-
* @var string $order_by Order groups by name or path (default is name)
19-
* @var string $sort Order groups in asc or desc order (default is asc)
20-
* @var bool $statistics include group statistics (admins only)
21-
* @var bool $owned limit by groups owned by the current user
15+
* @var int[] $skip_groups skip the group IDs passes
16+
* @var bool $all_available show all the groups you have access to
17+
* @var string $search return list of authorized groups matching the search criteria
18+
* @var string $order_by Order groups by name or path (default is name)
19+
* @var string $sort Order groups in asc or desc order (default is asc)
20+
* @var bool $statistics include group statistics (admins only)
21+
* @var bool $owned limit by groups owned by the current user
22+
* @var int $min_access_level limit by groups in which the current user has at least this access level
2223
* }
2324
*
2425
* @return mixed
@@ -446,6 +447,9 @@ private function getGroupSearchResolver()
446447
->setAllowedTypes('owned', 'bool')
447448
->setNormalizer('owned', $booleanNormalizer)
448449
;
450+
$resolver->setDefined('min_access_level')
451+
->setAllowedValues('min_access_level', [null, 10, 20, 30, 40, 50])
452+
;
449453

450454
return $resolver;
451455
}

0 commit comments

Comments
 (0)