diff --git a/CHANGELOG.md b/CHANGELOG.md index 3011188..62536c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Add 'host update' command (fix [#2](https://github.com/moul/sshportal/issues/2)) * Add 'user update' command (fix [#3](https://github.com/moul/sshportal/issues/3)) * Add 'acl update' command (fix [#4](https://github.com/moul/sshportal/issues/4)) +* Allow connecting to the shell mode with the registered username or email ## v1.2.0 (2017-11-22) diff --git a/main.go b/main.go index b73a32c..26a52cd 100644 --- a/main.go +++ b/main.go @@ -119,7 +119,7 @@ func server(c *cli.Context) error { } switch username := s.User(); { - case username == c.String("config-user"): + case username == currentUser.Name || username == currentUser.Email || username == c.String("config-user"): if !UserHasRole(currentUser, "admin") { fmt.Fprintf(s, "You are not an administrator, permission denied.\n") return