Fixed a bug where it was not possible to give a user access to a namespace
This commit is contained in:
parent
4f538abc83
commit
1e993f1e5c
1 changed files with 3 additions and 0 deletions
|
@ -3,6 +3,9 @@ package models
|
||||||
// Create creates a new namespace <-> user relation
|
// Create creates a new namespace <-> user relation
|
||||||
func (un *NamespaceUser) Create(user *User) (err error) {
|
func (un *NamespaceUser) Create(user *User) (err error) {
|
||||||
|
|
||||||
|
// Reset the id
|
||||||
|
un.ID = 0
|
||||||
|
|
||||||
// Check if the right is valid
|
// Check if the right is valid
|
||||||
if err := un.Right.isValid(); err != nil {
|
if err := un.Right.isValid(); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue