1
0

Added method to show all namespaces a user has access to

This commit is contained in:
kolaente
2018-07-02 08:54:44 +02:00
parent 6dfdcb9571
commit 124e4f4a5b
8 changed files with 88 additions and 35 deletions

View File

@ -207,7 +207,6 @@ func (err ErrNeedToBeItemOwner) Error() string {
return fmt.Sprintf("You need to be item owner to do that [ItemID: %d, UserID: %d]", err.ItemID, err.UserID)
}
// =================
// Namespace errors
// =================
@ -230,7 +229,7 @@ func (err ErrNamespaceDoesNotExist) Error() string {
// ErrNeedToBeNamespaceOwner represents an error, where the user is not the owner of that namespace (used i.e. when deleting a namespace)
type ErrNeedToBeNamespaceOwner struct {
NamespaceID int64
UserID int64
UserID int64
}
// IsErrNamespaceDoesNotExist checks if an error is a ErrNamespaceDoesNotExist.
@ -241,4 +240,4 @@ func IsErrNeedToBeNamespaceOwner(err error) bool {
func (err ErrNeedToBeNamespaceOwner) Error() string {
return fmt.Sprintf("You need to be namespace owner to do that [NamespaceID: %d, UserID: %d]", err.NamespaceID, err.UserID)
}
}