fix(task): do not require admin permission to move tasks between buckets
Resolves https://community.vikunja.io/t/moving-between-buckets-requires-admin-permissions-now/2390
This commit is contained in:
parent
a6fccfb908
commit
6c8299772a
@ -47,11 +47,8 @@ func (tp *TaskPosition) TableName() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (tp *TaskPosition) CanUpdate(s *xorm.Session, a web.Auth) (bool, error) {
|
func (tp *TaskPosition) CanUpdate(s *xorm.Session, a web.Auth) (bool, error) {
|
||||||
pv, err := GetProjectViewByID(s, tp.ProjectViewID)
|
t := &Task{ID: tp.TaskID}
|
||||||
if err != nil {
|
return t.CanUpdate(s, a)
|
||||||
return false, err
|
|
||||||
}
|
|
||||||
return pv.CanUpdate(s, a)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is the handler to update a task position
|
// Update is the handler to update a task position
|
||||||
|
Loading…
x
Reference in New Issue
Block a user