Forráskód Böngészése

#526 add adminUser flag and messages

Shinsuke Sugaya 9 éve
szülő
commit
6ae633905d

+ 3 - 1
src/main/java/org/codelibs/fess/app/web/base/FessSearchAction.java

@@ -116,7 +116,9 @@ public abstract class FessSearchAction extends FessBaseAction {
             locale = Locale.ENGLISH;
         }
         runtime.registerData("langItems", systemHelper.getLanguageItems(locale));
-        runtime.registerData("username", systemHelper.getUsername());
+        String username = systemHelper.getUsername();
+        runtime.registerData("username", username);
+        runtime.registerData("adminUser", fessConfig.isAdminUser(username));
 
         runtime.registerData("pageLoginLink", fessConfig.isPageLoginLink());
     }

+ 3 - 0
src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java

@@ -797,6 +797,9 @@ public class FessLabels extends ActionMessages {
     /** The key of the message: Change Password */
     public static final String LABELS_PROFILE = "{labels.profile}";
 
+    /** The key of the message: Administration */
+    public static final String LABELS_ADMINISTRATION = "{labels.administration}";
+
     /** The key of the message: Profile */
     public static final String LABELS_profile_button = "{labels.profile_button}";
 

+ 1 - 0
src/main/resources/fess_label.properties

@@ -256,6 +256,7 @@ labels.logout=Logout
 labels.do_you_want_to_logout=Do you want to logout?
 labels.logout_button=Logout
 labels.profile=Change Password
+labels.administration=Administration
 labels.profile_button=Profile
 labels.profile.title=Profile
 labels.profile.update=Update

+ 1 - 0
src/main/resources/fess_label_en.properties

@@ -256,6 +256,7 @@ labels.logout=Logout
 labels.do_you_want_to_logout=Do you want to logout?
 labels.logout_button=Logout
 labels.profile=Change Password
+labels.administration=Administration
 labels.profile_button=Profile
 labels.profile.title=Profile
 labels.profile.update=Update

+ 1 - 0
src/main/resources/fess_label_ja.properties

@@ -252,6 +252,7 @@ labels.logout=\u30ed\u30b0\u30a2\u30a6\u30c8
 labels.do_you_want_to_logout=\u30ed\u30b0\u30a2\u30a6\u30c8\u3057\u307e\u3059\u304b\uff1f
 labels.logout_button=\u30ed\u30b0\u30a2\u30a6\u30c8
 labels.profile=\u30d1\u30b9\u30ef\u30fc\u30c9\u5909\u66f4
+labels.administration=\u7ba1\u7406
 labels.profile_button=\u8a2d\u5b9a
 labels.profile.title= \u8a2d\u5b9a
 labels.profile.update= \u66f4\u65b0