mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +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
@@ -19,7 +19,7 @@
|
||||
.d-flex.justify-content-between
|
||||
h3.task-title(:class="{ 'has-notes': task.notes }", v-markdown="task.text")
|
||||
menu-dropdown.task-dropdown(
|
||||
v-if="!isRunningYesterdailies",
|
||||
v-if="!isRunningYesterdailies && showOptions",
|
||||
:right="task.type === 'reward'",
|
||||
ref="taskDropdown",
|
||||
v-b-tooltip.hover.top="$t('options')"
|
||||
@@ -555,7 +555,7 @@ export default {
|
||||
directives: {
|
||||
markdown: markdownDirective,
|
||||
},
|
||||
props: ['task', 'isUser', 'group', 'dueDate'], // @TODO: maybe we should store the group on state?
|
||||
props: ['task', 'isUser', 'group', 'dueDate', 'showOptions'], // @TODO: maybe we should store the group on state?
|
||||
data () {
|
||||
return {
|
||||
random: uuid.v4(), // used to avoid conflicts between checkboxes ids
|
||||
|
||||
Reference in New Issue
Block a user