feature: Reduce debug log spam in ACL/getDashboardComponents (#176)
This commit is contained in:
parent
50204f8180
commit
311f9a1d00
|
|
@ -25,7 +25,7 @@ func IsAllowedExec(cfg *config.Config, user *AuthenticatedUser, action *config.A
|
||||||
"User": user.Username,
|
"User": user.Username,
|
||||||
"Action": action.Title,
|
"Action": action.Title,
|
||||||
"ACL": acl.Name,
|
"ACL": acl.Name,
|
||||||
}).Debug("isAllowedExec - Matched ACL")
|
}).Trace("isAllowedExec - Matched ACL")
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
@ -34,7 +34,7 @@ func IsAllowedExec(cfg *config.Config, user *AuthenticatedUser, action *config.A
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"User": user.Username,
|
"User": user.Username,
|
||||||
"Action": action.Title,
|
"Action": action.Title,
|
||||||
}).Debug("isAllowedExec - No ACLs matched")
|
}).Trace("isAllowedExec - No ACLs matched")
|
||||||
|
|
||||||
return cfg.DefaultPermissions.Exec
|
return cfg.DefaultPermissions.Exec
|
||||||
}
|
}
|
||||||
|
|
@ -47,7 +47,7 @@ func IsAllowedView(cfg *config.Config, user *AuthenticatedUser, action *config.A
|
||||||
"User": user.Username,
|
"User": user.Username,
|
||||||
"Action": action.Title,
|
"Action": action.Title,
|
||||||
"ACL": acl.Name,
|
"ACL": acl.Name,
|
||||||
}).Debug("isAllowedView - Matched ACL")
|
}).Trace("isAllowedView - Matched ACL")
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
@ -56,7 +56,7 @@ func IsAllowedView(cfg *config.Config, user *AuthenticatedUser, action *config.A
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"User": user.Username,
|
"User": user.Username,
|
||||||
"Action": action.Title,
|
"Action": action.Title,
|
||||||
}).Debug("isAllowedView - No ACLs matched")
|
}).Trace("isAllowedView - No ACLs matched")
|
||||||
|
|
||||||
return cfg.DefaultPermissions.View
|
return cfg.DefaultPermissions.View
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ func (api *oliveTinAPI) GetDashboardComponents(ctx ctx.Context, req *pb.GetDashb
|
||||||
log.Warn("Zero actions found - check that you have some actions defined, with a view permission")
|
log.Warn("Zero actions found - check that you have some actions defined, with a view permission")
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debugf("GetDashboardComponents: %v", res)
|
log.Tracef("GetDashboardComponents: %v", res)
|
||||||
|
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue