mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
make a combination in if condition
This commit is contained in:
parent
cb9b8a7f55
commit
648a5746dd
@ -127,8 +127,6 @@ func (b *BaseController) Prepare() {
|
|||||||
log.Errorf("Error occurred in IsAdminRole:%v", err)
|
log.Errorf("Error occurred in IsAdminRole:%v", err)
|
||||||
b.CustomAbort(http.StatusInternalServerError, "Internal error.")
|
b.CustomAbort(http.StatusInternalServerError, "Internal error.")
|
||||||
}
|
}
|
||||||
}else {
|
|
||||||
b.IsLdapAdminUser = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
b.Data["IsAdmin"] = b.IsAdmin
|
b.Data["IsAdmin"] = b.IsAdmin
|
||||||
|
@ -57,11 +57,9 @@
|
|||||||
<li><a id="aChangePassword" href="/changePassword" target="_blank"><span class="glyphicon glyphicon-pencil"></span> {{i18n .Lang "change_password"}}</a></li>
|
<li><a id="aChangePassword" href="/changePassword" target="_blank"><span class="glyphicon glyphicon-pencil"></span> {{i18n .Lang "change_password"}}</a></li>
|
||||||
<li role="separator" class="divider"></li>
|
<li role="separator" class="divider"></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if eq .AuthMode "ldap_auth" }}
|
{{ if eq .IsLdapAdminUser true }}
|
||||||
{{ if eq .IsLdapAdminUser true }}
|
|
||||||
<li><a id="aChangePassword" href="/changePassword" target="_blank"><span class="glyphicon glyphicon-pencil"></span> {{i18n .Lang "change_password"}}</a></li>
|
<li><a id="aChangePassword" href="/changePassword" target="_blank"><span class="glyphicon glyphicon-pencil"></span> {{i18n .Lang "change_password"}}</a></li>
|
||||||
<li role="separator" class="divider"></li>
|
<li role="separator" class="divider"></li>
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if eq .AuthMode "db_auth" }}
|
{{ if eq .AuthMode "db_auth" }}
|
||||||
{{ if eq .IsAdmin true }}
|
{{ if eq .IsAdmin true }}
|
||||||
|
Loading…
Reference in New Issue
Block a user