1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-09 18:25:58 +01:00

Simplify syntax of permissionsMap.

This commit is contained in:
Juliusz Chroboczek 2024-06-02 01:45:51 +02:00
parent 8db2e92cb9
commit ddcb9ed0cc

View file

@ -26,11 +26,11 @@ type Permissions struct {
} }
var permissionsMap = map[string][]string{ var permissionsMap = map[string][]string{
"op": []string{"op", "present", "message", "token"}, "op": {"op", "present", "message", "token"},
"present": []string{"present", "message"}, "present": {"present", "message"},
"message": []string{"message"}, "message": {"message"},
"observe": []string{}, "observe": {},
"admin": []string{"admin"}, "admin": {"admin"},
} }
func NewPermissions(name string) (Permissions, error) { func NewPermissions(name string) (Permissions, error) {