Add group limit for creating boards
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -31,6 +31,7 @@ use OCA\Deck\Db\AssignedUsersMapper;
|
||||
use OCA\Deck\Db\ChangeHelper;
|
||||
use OCA\Deck\Db\IPermissionMapper;
|
||||
use OCA\Deck\Db\Label;
|
||||
use OCA\Deck\NoPermissionException;
|
||||
use OCA\Deck\Notification\NotificationHelper;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\IGroupManager;
|
||||
@@ -250,6 +251,10 @@ class BoardService {
|
||||
throw new BadRequestException('color must be provided');
|
||||
}
|
||||
|
||||
if (!$this->permissionService->canCreate()) {
|
||||
throw new NoPermissionException('Creating boards has been disabled for your account.');
|
||||
}
|
||||
|
||||
$board = new Board();
|
||||
$board->setTitle($title);
|
||||
$board->setOwner($userId);
|
||||
|
||||
Reference in New Issue
Block a user