From 1e993f1e5c947df681ce3166b10593ca8cb91748 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 19 Sep 2018 08:03:05 +0200 Subject: [PATCH] Fixed a bug where it was not possible to give a user access to a namespace --- models/namespace_users_create.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/namespace_users_create.go b/models/namespace_users_create.go index 76e676696..fca5bbada 100644 --- a/models/namespace_users_create.go +++ b/models/namespace_users_create.go @@ -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