mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Fix: Edit/deleting tasks in a challenge appears possible for people who are not admin/the creator (#11349)
* Fix: introduce new prop showOptions for task component - Pull showOptions propr from challenge container to task itself to restrict editing for non leader of challenge users * Fix: for group plan edit/delete tasks
This commit is contained in:
committed by
Matteo Pagliazzi
parent
65906f0b71
commit
659c7e7249
@@ -57,6 +57,7 @@
|
||||
:type="column",
|
||||
:key="column",
|
||||
:taskListOverride='tasksByType[column]',
|
||||
:showOptions="showOptions",
|
||||
@editTask="editTask",
|
||||
@taskDestroyed="taskDestroyed",
|
||||
v-if='tasksByType[column].length > 0')
|
||||
@@ -251,6 +252,9 @@ export default {
|
||||
canJoin () {
|
||||
return !this.isMember;
|
||||
},
|
||||
showOptions () {
|
||||
return this.isLeader;
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
if (!this.searchId) this.searchId = this.challengeId;
|
||||
|
||||
Reference in New Issue
Block a user