1
0

fix(views): make bucket creation work again

This commit is contained in:
kolaente
2024-03-16 15:08:29 +01:00
parent 4c1a53beed
commit 445f1c06fa
3 changed files with 14 additions and 6 deletions

View File

@ -23,7 +23,10 @@ import (
// CanCreate checks if a user can create a new bucket
func (b *Bucket) CanCreate(s *xorm.Session, a web.Auth) (bool, error) {
pv := &ProjectView{ID: b.ProjectViewID}
pv := &ProjectView{
ID: b.ProjectViewID,
ProjectID: b.ProjectID,
}
return pv.CanUpdate(s, a)
}
@ -43,6 +46,9 @@ func (b *Bucket) canDoBucket(s *xorm.Session, a web.Auth) (bool, error) {
if err != nil {
return false, err
}
pv := &ProjectView{ID: bb.ProjectViewID}
pv := &ProjectView{
ID: bb.ProjectViewID,
ProjectID: bb.ProjectID,
}
return pv.CanUpdate(s, a)
}