mirror of
https://github.com/goharbor/harbor
synced 2025-04-14 05:52:46 +00:00
add logs
This commit is contained in:
parent
9fbebad626
commit
0f0bc86ade
|
@ -39,6 +39,7 @@ const (
|
|||
|
||||
// GetResourceActions ...
|
||||
func GetResourceActions(scopes []string) []*token.ResourceActions {
|
||||
log.Debugf("scopes: %+v", scopes)
|
||||
var res []*token.ResourceActions
|
||||
for _, s := range scopes {
|
||||
if s == "" {
|
||||
|
@ -59,6 +60,7 @@ func GetResourceActions(scopes []string) []*token.ResourceActions {
|
|||
func FilterAccess(username string, authenticated bool, a *token.ResourceActions) {
|
||||
|
||||
if a.Type == "registry" && a.Name == "catalog" {
|
||||
log.Infof("current access, type: %s, name:%s, actions:%v \n", a.Type, a.Name, a.Actions)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@ func (h *Handler) Get() {
|
|||
authenticated := authenticate(username, password)
|
||||
service := h.GetString("service")
|
||||
scopes := h.GetStrings("scope")
|
||||
log.Debugf("scopes: %+v", scopes)
|
||||
|
||||
if len(scopes) == 0 && !authenticated {
|
||||
log.Info("login request with invalid credentials")
|
||||
|
|
Loading…
Reference in New Issue
Block a user