mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-15 20:22:01 +01:00
Fail with 401 for GET .../users/current/permissions
fixes #14862 Signed-off-by: Daniel Jiang <jiangd@vmware.com>
This commit is contained in:
parent
1896df2cfb
commit
93fe178dc3
@ -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 {
|
func (u *usersAPI) GetCurrentUserPermissions(ctx context.Context, params operation.GetCurrentUserPermissionsParams) middleware.Responder {
|
||||||
if err := u.RequireAuthenticated(ctx); err != nil {
|
if err := u.RequireAuthenticated(ctx); err != nil {
|
||||||
u.SendError(ctx, err)
|
return u.SendError(ctx, err)
|
||||||
}
|
}
|
||||||
scope := ""
|
scope := ""
|
||||||
if params.Scope != nil {
|
if params.Scope != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user