Fix team rights not updating for namespace rights
This commit is contained in:
parent
55cd74efca
commit
55cd40d175
2 changed files with 3 additions and 3 deletions
|
@ -235,11 +235,11 @@ func (lu *ListUser) Update() (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the user exists
|
// Check if the user exists
|
||||||
user, err := user.GetUserByUsername(lu.Username)
|
u, err := user.GetUserByUsername(lu.Username)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
lu.UserID = user.ID
|
lu.UserID = u.ID
|
||||||
|
|
||||||
_, err = x.
|
_, err = x.
|
||||||
Where("list_id = ? AND user_id = ?", lu.ListID, lu.UserID).
|
Where("list_id = ? AND user_id = ?", lu.ListID, lu.UserID).
|
||||||
|
|
|
@ -220,7 +220,7 @@ func (tn *TeamNamespace) Update() (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = x.
|
_, err = x.
|
||||||
Where("namespace_id = ? AND team_id = ?", tn.TeamID, tn.TeamID).
|
Where("namespace_id = ? AND team_id = ?", tn.NamespaceID, tn.TeamID).
|
||||||
Cols("right").
|
Cols("right").
|
||||||
Update(tn)
|
Update(tn)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue