1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-16 09:33:18 +02:00

User-owned ACL entries

This commit is contained in:
binwiederhier 2023-01-01 15:21:43 -05:00
parent 598d0bdda3
commit 2267d27c9b
9 changed files with 160 additions and 57 deletions

View file

@ -108,7 +108,7 @@ func changeAccess(c *cli.Context, manager *user.Manager, username string, topic
} else if u.Role == user.RoleAdmin {
return fmt.Errorf("user %s is an admin user, access control entries have no effect", username)
}
if err := manager.AllowAccess(username, topic, read, write); err != nil {
if err := manager.AllowAccess("", username, topic, read, write); err != nil {
return err
}
if read && write {