瀏覽代碼

fix #527 : hide ldap user attributes

Shinsuke Sugaya 9 年之前
父節點
當前提交
ea3f34ec19

+ 1 - 0
src/main/java/org/codelibs/fess/app/web/admin/user/AdminUserAction.java

@@ -69,6 +69,7 @@ public class AdminUserAction extends FessAdminAction {
     protected void setupHtmlData(final ActionRuntime runtime) {
         super.setupHtmlData(runtime);
         runtime.registerData("helpLink", systemHelper.getHelpLink(fessConfig.getOnlineHelpNameUser()));
+        runtime.registerData("ldapAdminEnabled", fessConfig.isLdapAdminEnabled());
     }
 
     // ===================================================================================

+ 2 - 0
src/main/webapp/WEB-INF/view/admin/user/admin_user_details.jsp

@@ -62,6 +62,7 @@
 												<th class="col-xs-2"><la:message key="labels.user_mail" /></th>
 												<td>${f:h(mail)}<la:hidden property="mail" /></td>
 											</tr>
+											<c:if test="${ldapAdminEnabled}">
 											<tr>
 												<th class="col-xs-2"><la:message key="labels.user_employeeNumber" /></th>
 												<td>${f:h(employeeNumber)}<la:hidden property="employeeNumber" /></td>
@@ -194,6 +195,7 @@
 												<th class="col-xs-2"><la:message key="labels.user_homeDirectory" /></th>
 												<td>${f:h(homeDirectory)}<la:hidden property="homeDirectory" /></td>
 											</tr>
+											</c:if>
 											<tr>
 												<th><la:message key="labels.roles" /></th>
 												<td><c:forEach var="rt" varStatus="s"

+ 2 - 0
src/main/webapp/WEB-INF/view/admin/user/admin_user_edit.jsp

@@ -97,6 +97,7 @@
 											<la:text property="mail" styleClass="form-control" />
 										</div>
 									</div>
+									<c:if test="${ldapAdminEnabled}">
 									<div class="form-group">
 										<label for="employeeNumber" class="col-sm-3 control-label"><la:message
 												key="labels.user_employeeNumber" /></label>
@@ -361,6 +362,7 @@
 											<la:text property="homeDirectory" styleClass="form-control" />
 										</div>
 									</div>
+									</c:if>
 									<div class="form-group">
 										<label for="roles" class="col-sm-3 control-label"><la:message
 												key="labels.roles" /></label>