aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--perms.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/perms.go b/perms.go
index 85091ae..b1ce260 100644
--- a/perms.go
+++ b/perms.go
@@ -21,7 +21,10 @@ func (cc *ClientConn) Perms() []string {
// HasPerms returns true if the ClientConn has all
// of the specified permissions. Otherwise it returns false.
func (cc *ClientConn) HasPerms(want ...string) bool {
- has := make(map[string]struct{})
+ has := map[string]struct{}{
+ "": struct{}{},
+ }
+
for _, perm := range cc.Perms() {
has[perm] = struct{}{}
}