Change summary
server/cmd/user.go | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
Detailed changes
@@ -141,7 +141,7 @@ func userCommand() *cobra.Command {
Args: cobra.ExactArgs(1),
PersistentPreRunE: checkIfAdmin,
RunE: func(cmd *cobra.Command, args []string) error {
- cfg, s := fromContext(cmd)
+ cfg, _ := fromContext(cmd)
username := args[0]
user, err := cfg.Backend.User(username)
@@ -150,12 +150,6 @@ func userCommand() *cobra.Command {
}
isAdmin := user.IsAdmin()
- for _, k := range cfg.AdminKeys() {
- if backend.KeysEqual(k, s.PublicKey()) {
- isAdmin = true
- break
- }
- }
cmd.Printf("Username: %s\n", user.Username())
cmd.Printf("Admin: %t\n", isAdmin)