Fail with 401 for GET .../users/current/permissions

fixes #14862

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
This commit is contained in:
Daniel Jiang 2021-05-19 16:28:39 +08:00
parent 1896df2cfb
commit 93fe178dc3

View File

@ -137,7 +137,7 @@ func (u *usersAPI) ListUsers(ctx context.Context, params operation.ListUsersPara
func (u *usersAPI) GetCurrentUserPermissions(ctx context.Context, params operation.GetCurrentUserPermissionsParams) middleware.Responder {
if err := u.RequireAuthenticated(ctx); err != nil {
u.SendError(ctx, err)
return u.SendError(ctx, err)
}
scope := ""
if params.Scope != nil {