Merge pull request #14923 from reasonerjt/fix-14862

Fail with 401 for GET .../users/current/permissions
This commit is contained in:
Wenkai Yin(尹文开) 2021-05-20 14:02:32 +08:00 committed by GitHub
commit 9afeb90646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {