mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-24 19:42:52 +02:00
changed logger level for some if clauses.
This commit is contained in:
parent
69846a7a7c
commit
290cdebc42
@ -34,7 +34,7 @@ type RegisterController struct {
|
|||||||
func (rc *RegisterController) Get() {
|
func (rc *RegisterController) Get() {
|
||||||
|
|
||||||
if !rc.SelfRegistration {
|
if !rc.SelfRegistration {
|
||||||
log.Error("Registration is disabled when self-registration is off.\n")
|
log.Warning("Registration is disabled when self-registration is off.")
|
||||||
rc.Redirect("/signIn", http.StatusFound)
|
rc.Redirect("/signIn", http.StatusFound)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ type AddUserController struct {
|
|||||||
func (ac *AddUserController) Get() {
|
func (ac *AddUserController) Get() {
|
||||||
|
|
||||||
if !ac.IsAdmin {
|
if !ac.IsAdmin {
|
||||||
log.Error("Add user can only be used by admin role user.\n")
|
log.Warning("Add user can only be used by admin role user.")
|
||||||
ac.Redirect("/signIn", http.StatusFound)
|
ac.Redirect("/signIn", http.StatusFound)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ func (cc *CommonController) SignUp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !(cc.SelfRegistration || cc.IsAdmin) {
|
if !(cc.SelfRegistration || cc.IsAdmin) {
|
||||||
log.Error("Registration can only be used by admin role user when self-registration is off.\n")
|
log.Warning("Registration can only be used by admin role user when self-registration is off.")
|
||||||
cc.CustomAbort(http.StatusForbidden, "")
|
cc.CustomAbort(http.StatusForbidden, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user