mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Fixed when user unclaims a task assigned to them (#9578)
* Fixed when user unclaims a task assigned to them * Removed test * Fixed lint
This commit is contained in:
@@ -243,7 +243,7 @@ api.unassignTask = {
|
||||
let group = await Group.getGroup({user, groupId: task.group.id, fields});
|
||||
if (!group) throw new NotFound(res.t('groupNotFound'));
|
||||
|
||||
if (canNotEditTasks(group, user)) throw new NotAuthorized(res.t('onlyGroupLeaderCanEditTasks'));
|
||||
if (canNotEditTasks(group, user, assignedUserId)) throw new NotAuthorized(res.t('onlyGroupLeaderCanEditTasks'));
|
||||
|
||||
await group.unlinkTask(task, assignedUser);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user