mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
[WIP] Group tasks claim (#8099)
* Added initial group tasks ui * Changed group compnent directory * Added group task checklist support * Added checklist support to ui * Fixed delete tags route * Added checklist routes to support new group tasks * Added assign user tag input * Added new group members autocomplete directive * Linked assign ui to api * Added styles * Limited tag use * Fixed line endings * Updated to new file structure * Fixed failing task tests * Updatd with new checklist logic and fixed columns * Updated add task function * Added userid check back to tag routes * Added back routes accidently deleted * Added locale strings * Moved common task function to task service * Removed files from manifest * Added initial group tasks ui * Changed group compnent directory * Added checklist support to ui * Added assign user tag input * Added assign user tag input * Added new group members autocomplete directive * Added new group members autocomplete directive * Removed group get tasks until live * Linked assign ui to api * Added styles * Added server code for claiming a task * ADded group task meta and claim button * Adjusted styles, added local, and added confirm * Updated claim with new file structures * Fixed merge issue * Removed extra file * Removed duplicate functions * Removed extra directive * Removed dev items
This commit is contained in:
committed by
Matteo Pagliazzi
parent
826d7b85d7
commit
ff08e8b586
@@ -122,7 +122,7 @@ api.assignTask = {
|
||||
let group = await Group.getGroup({user, groupId: task.group.id, fields: requiredGroupFields});
|
||||
if (!group) throw new NotFound(res.t('groupNotFound'));
|
||||
|
||||
if (group.leader !== user._id) throw new NotAuthorized(res.t('onlyGroupLeaderCanEditTasks'));
|
||||
if (group.leader !== user._id && user._id !== assignedUserId) throw new NotAuthorized(res.t('onlyGroupLeaderCanEditTasks'));
|
||||
|
||||
await group.syncTask(task, assignedUser);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user