зеркало из https://github.com/nextcloud/deck.git
Make sure only groups can create if set
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Родитель
96dffbfedd
Коммит
b8d00c8228
|
@ -248,12 +248,15 @@ class PermissionService {
|
|||
|
||||
public function canCreate() {
|
||||
$groups = $this->getGroupLimitList();
|
||||
if (count($groups) === 0) {
|
||||
return true;
|
||||
}
|
||||
foreach ($groups as $group) {
|
||||
if ($this->groupManager->isInGroup($this->userId, $group)) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private function getGroupLimitList() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче