mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-17 01:53:17 +02:00
WIP tier CLI
This commit is contained in:
parent
9b54f63eb1
commit
e3b39f670f
10 changed files with 367 additions and 35 deletions
cmd
|
@ -189,7 +189,11 @@ func showUsers(c *cli.Context, manager *user.Manager, users []*user.User) error
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Fprintf(c.App.ErrWriter, "user %s (%s)\n", u.Name, u.Role)
|
||||
tier := "none"
|
||||
if u.Tier != nil {
|
||||
tier = u.Tier.Name
|
||||
}
|
||||
fmt.Fprintf(c.App.ErrWriter, "user %s (role: %s, tier: %s)\n", u.Name, u.Role, tier)
|
||||
if u.Role == user.RoleAdmin {
|
||||
fmt.Fprintf(c.App.ErrWriter, "- read-write access to all topics (admin role)\n")
|
||||
} else if len(grants) > 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue