Compare commits

...

2 Commits

Author SHA1 Message Date
SabreCat
0ce0fd1649 4.241.1 2022-08-23 14:37:14 -05:00
SabreCat
f22d02fcc6 fix(checklists): allow checking own lists 2022-08-23 14:37:03 -05:00
3 changed files with 4 additions and 3 deletions

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "habitica",
"version": "4.241.0",
"version": "4.241.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,7 +1,7 @@
{
"name": "habitica",
"description": "A habit tracker app which treats your goals like a Role Playing Game.",
"version": "4.241.0",
"version": "4.241.1",
"main": "./website/server/index.js",
"dependencies": {
"@babel/core": "^7.18.10",

View File

@@ -961,7 +961,8 @@ api.scoreCheckListItem = {
if (!task || (!task.userId && !task.group.id)) throw new NotFound(res.t('messageTaskNotFound'));
if (task.userId && task.userId !== user._id) {
throw new BadRequest('Cannot score task belonging to another user.');
} else if (user.guilds.indexOf(task.group.id) === -1 && user.party._id !== task.group.id) {
} else if (task.group.id && user.guilds.indexOf(task.group.id) === -1
&& user.party._id !== task.group.id) {
throw new BadRequest('Cannot score task belonging to another user.');
}
if (task.type !== 'daily' && task.type !== 'todo') throw new BadRequest(res.t('checklistOnlyDailyTodo'));