Add frontend for assigning groups to cards

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-03-22 14:50:02 +01:00
parent 3c6a177da9
commit d6eac1b11a
12 changed files with 198 additions and 160 deletions

View File

@@ -86,7 +86,8 @@ class AssignmentService {
NotificationHelper $notificationHelper,
ActivityManager $activityManager,
ChangeHelper $changeHelper,
IEventDispatcher $eventDispatcher
IEventDispatcher $eventDispatcher,
$userId
) {
$this->permissionService = $permissionService;
$this->cardMapper = $cardMapper;
@@ -96,6 +97,7 @@ class AssignmentService {
$this->changeHelper = $changeHelper;
$this->activityManager = $activityManager;
$this->eventDispatcher = $eventDispatcher;
$this->currentUser = $userId;
}
/**
@@ -107,7 +109,7 @@ class AssignmentService {
* @throws MultipleObjectsReturnedException
* @throws DoesNotExistException
*/
public function assignUser($cardId, $userId, int $type = 0) {
public function assignUser($cardId, $userId, int $type = AssignedUsers::TYPE_USER) {
if (is_numeric($cardId) === false) {
throw new BadRequestException('card id must be a number');