mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Fix: unauthorized sorting of group tasks (#11348)
- Check if column is belongs to user dashboard before choosing which endpoint use to move task
This commit is contained in:
committed by
Matteo Pagliazzi
parent
9a49a05eac
commit
7219aa963b
@@ -482,7 +482,7 @@ export default {
|
|||||||
const newIndexOnServer = originTasks.findIndex(taskId => taskId === taskIdToReplace);
|
const newIndexOnServer = originTasks.findIndex(taskId => taskId === taskIdToReplace);
|
||||||
|
|
||||||
let newOrder;
|
let newOrder;
|
||||||
if (taskToMove.group.id) {
|
if (taskToMove.group.id && !this.isUser) {
|
||||||
newOrder = await this.$store.dispatch('tasks:moveGroupTask', {
|
newOrder = await this.$store.dispatch('tasks:moveGroupTask', {
|
||||||
taskId: taskIdToMove,
|
taskId: taskIdToMove,
|
||||||
position: newIndexOnServer,
|
position: newIndexOnServer,
|
||||||
|
|||||||
Reference in New Issue
Block a user