fix(views): make setting task position in saved filters work
This commit is contained in:
@ -118,6 +118,16 @@ func (p *Project) CanUpdate(s *xorm.Session, a web.Auth) (canUpdate bool, err er
|
||||
return false, nil
|
||||
}
|
||||
|
||||
fid := getSavedFilterIDFromProjectID(p.ID)
|
||||
if fid > 0 {
|
||||
sf, err := getSavedFilterSimpleByID(s, fid)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
return sf.CanUpdate(s, a)
|
||||
}
|
||||
|
||||
// Get the project
|
||||
ol, err := GetProjectSimpleByID(s, p.ID)
|
||||
if err != nil {
|
||||
@ -137,16 +147,6 @@ func (p *Project) CanUpdate(s *xorm.Session, a web.Auth) (canUpdate bool, err er
|
||||
}
|
||||
}
|
||||
|
||||
fid := getSavedFilterIDFromProjectID(p.ID)
|
||||
if fid > 0 {
|
||||
sf, err := getSavedFilterSimpleByID(s, fid)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
return sf.CanUpdate(s, a)
|
||||
}
|
||||
|
||||
canUpdate, err = p.CanWrite(s, a)
|
||||
// If the project is archived and the user tries to un-archive it, let the request through
|
||||
archivedErr := ErrProjectIsArchived{}
|
||||
|
Reference in New Issue
Block a user