make a combination in if condition

This commit is contained in:
xiahaoshawn 2016-05-10 10:58:43 +08:00
parent cb9b8a7f55
commit 648a5746dd
2 changed files with 2 additions and 6 deletions

View File

@ -127,8 +127,6 @@ func (b *BaseController) Prepare() {
log.Errorf("Error occurred in IsAdminRole:%v", err)
b.CustomAbort(http.StatusInternalServerError, "Internal error.")
}
}else {
b.IsLdapAdminUser = false
}
b.Data["IsAdmin"] = b.IsAdmin

View File

@ -57,12 +57,10 @@
<li><a id="aChangePassword" href="/changePassword" target="_blank"><span class="glyphicon glyphicon-pencil"></span>&nbsp;&nbsp;{{i18n .Lang "change_password"}}</a></li>
<li role="separator" class="divider"></li>
{{ 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>&nbsp;&nbsp;{{i18n .Lang "change_password"}}</a></li>
<li role="separator" class="divider"></li>
{{ end }}
{{ end }}
{{ end }}
{{ if eq .AuthMode "db_auth" }}
{{ if eq .IsAdmin true }}
<li><a id="aAddUser" href="/addUser" target="_blank"><span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;{{i18n .Lang "add_user"}}</a></li>