diff --git a/wwwshop/model/group/group.go b/wwwshop/model/group/group.go index 8ab2e23..b62510f 100644 --- a/wwwshop/model/group/group.go +++ b/wwwshop/model/group/group.go @@ -21,11 +21,8 @@ func New(id int64, groupname string, permissions map[string]string) Group { func (self Group) HasPermission(permission string) string { perm_value, ok := self.Permissions[permission] if ok { - if perm_value == "yes" { - return "yes" - } - if perm_value == "no" { - return "no" + if perm_value == "yes" || perm_value == "no" { + return perm_value } log.Printf("Invalid permission value for %s in group %s.\n", permission, self.Groupname) }