Skip to content

[10.4] Add min_access_level option to group search #605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions src/Api/Groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ class Groups extends AbstractApi
/**
* @param array $parameters {
*
* @var int[] $skip_groups skip the group IDs passes
* @var bool $all_available show all the groups you have access to
* @var string $search return list of authorized groups matching the search criteria
* @var string $order_by Order groups by name or path (default is name)
* @var string $sort Order groups in asc or desc order (default is asc)
* @var bool $statistics include group statistics (admins only)
* @var bool $owned limit by groups owned by the current user
* @var int[] $skip_groups skip the group IDs passes
* @var bool $all_available show all the groups you have access to
* @var string $search return list of authorized groups matching the search criteria
* @var string $order_by Order groups by name or path (default is name)
* @var string $sort Order groups in asc or desc order (default is asc)
* @var bool $statistics include group statistics (admins only)
* @var bool $owned limit by groups owned by the current user
* @var int $min_access_level limit by groups in which the current user has at least this access level
* }
*
* @return mixed
Expand Down Expand Up @@ -446,6 +447,9 @@ private function getGroupSearchResolver()
->setAllowedTypes('owned', 'bool')
->setNormalizer('owned', $booleanNormalizer)
;
$resolver->setDefined('min_access_level')
->setAllowedValues('min_access_level', [null, 10, 20, 30, 40, 50])
;

return $resolver;
}
Expand Down