Fix permission logic

master
HimbeerserverDE 2021-09-07 19:17:59 +02:00
parent d667e4af27
commit 2e3d72cccc
No known key found for this signature in database
GPG Key ID: 1A651504791E6A8B
2 changed files with 6 additions and 2 deletions

View File

@ -160,6 +160,6 @@ Description: This sets the group of a user.
> `UserGroups[k]`
```
Type: string
Default: ""
Default: "default"
Description: The group of the user.
```

View File

@ -7,7 +7,11 @@ func (cc *ClientConn) Perms() []string {
return []string{}
}
grp := Conf().UserGroups[cc.name]
grp, ok := Conf().UserGroups[cc.name]
if !ok {
grp = "default"
}
if perms, ok := Conf().Groups[grp]; ok {
return perms
}