Fixed a bug where it was not possible to give a user access to a namespace

This commit is contained in:
kolaente 2018-09-19 08:03:05 +02:00
parent 4f538abc83
commit 1e993f1e5c
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,9 @@ package models
// Create creates a new namespace <-> user relation
func (un *NamespaceUser) Create(user *User) (err error) {
// Reset the id
un.ID = 0
// Check if the right is valid
if err := un.Right.isValid(); err != nil {
return err