diff --git a/src/main/java/org/codelibs/fess/Constants.java b/src/main/java/org/codelibs/fess/Constants.java index 7b70b49cb..abd23aeaa 100644 --- a/src/main/java/org/codelibs/fess/Constants.java +++ b/src/main/java/org/codelibs/fess/Constants.java @@ -115,6 +115,8 @@ public class Constants extends CoreLibConstants { public static final String LOGIN_REQUIRED_PROPERTY = "login.required"; + public static final String LOGIN_LINK_ENALBED_PROPERTY = "login.link.enabled"; + public static final String IGNORE_FAILURE_TYPE_PROPERTY = "failure.ignoretype"; public static final String FAILURE_COUNT_THRESHOLD_PROPERTY = "failure.countthreshold"; diff --git a/src/main/java/org/codelibs/fess/app/web/admin/general/AdminGeneralAction.java b/src/main/java/org/codelibs/fess/app/web/admin/general/AdminGeneralAction.java index 64f9a402b..c493b23ce 100644 --- a/src/main/java/org/codelibs/fess/app/web/admin/general/AdminGeneralAction.java +++ b/src/main/java/org/codelibs/fess/app/web/admin/general/AdminGeneralAction.java @@ -118,6 +118,7 @@ public class AdminGeneralAction extends FessAdminAction { }); fessConfig.setLoginRequired(Constants.ON.equalsIgnoreCase(form.loginRequired)); + fessConfig.setLoginLinkEnabled(Constants.ON.equalsIgnoreCase(form.loginLink)); fessConfig.setIncrementalCrawling(Constants.ON.equalsIgnoreCase(form.incrementalCrawling)); fessConfig.setDayForCleanup(form.dayForCleanup); fessConfig.setCrawlingThreadCount(form.crawlingThreadCount); @@ -154,6 +155,7 @@ public class AdminGeneralAction extends FessAdminAction { protected void updateForm(final EditForm form) { form.loginRequired = fessConfig.isLoginRequired() ? Constants.TRUE : Constants.FALSE; + form.loginLink = fessConfig.isLoginLinkEnabled() ? Constants.TRUE : Constants.FALSE; form.incrementalCrawling = fessConfig.isIncrementalCrawling() ? Constants.TRUE : Constants.FALSE; form.dayForCleanup = fessConfig.getDayForCleanup(); form.crawlingThreadCount = fessConfig.getCrawlingThreadCount(); diff --git a/src/main/java/org/codelibs/fess/app/web/admin/general/EditForm.java b/src/main/java/org/codelibs/fess/app/web/admin/general/EditForm.java index 40aa6c348..296b0300c 100644 --- a/src/main/java/org/codelibs/fess/app/web/admin/general/EditForm.java +++ b/src/main/java/org/codelibs/fess/app/web/admin/general/EditForm.java @@ -71,6 +71,9 @@ public class EditForm implements Serializable { @Size(max = 10) public String loginRequired; + @Size(max = 10) + public String loginLink; + @Size(max = 1000) public String ignoreFailureType; diff --git a/src/main/java/org/codelibs/fess/app/web/base/FessSearchAction.java b/src/main/java/org/codelibs/fess/app/web/base/FessSearchAction.java index 6f29d388f..fd4f06744 100644 --- a/src/main/java/org/codelibs/fess/app/web/base/FessSearchAction.java +++ b/src/main/java/org/codelibs/fess/app/web/base/FessSearchAction.java @@ -120,7 +120,7 @@ public abstract class FessSearchAction extends FessBaseAction { runtime.registerData("username", username); runtime.registerData("adminUser", fessConfig.isAdminUser(username)); - runtime.registerData("pageLoginLink", fessConfig.isPageLoginLink()); + runtime.registerData("pageLoginLink", fessConfig.isLoginLinkEnabled()); } // =================================================================================== diff --git a/src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java b/src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java index ab396835b..a6f25faea 100644 --- a/src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java +++ b/src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java @@ -496,9 +496,6 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction /** The key of the configuration. e.g. true */ String PAGING_PAGE_RANGE_FILL_LIMIT = "paging.page.range.fill.limit"; - /** The key of the configuration. e.g. true */ - String PAGE_LOGIN_LINK = "page.login.link"; - /** The key of the configuration. e.g. 1000 */ String PAGE_DOCBOOST_MAX_FETCH_SIZE = "page.docboost.max.fetch.size"; @@ -2329,22 +2326,6 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction */ boolean isPagingPageRangeFillLimit(); - /** - * Get the value for the key 'page.login.link'.
- * The value is, e.g. true
- * comment: The option 'loginLink' of page link button for search page - * @return The value of found property. (NotNull: if not found, exception but basically no way) - */ - String getPageLoginLink(); - - /** - * Is the property for the key 'page.login.link' true?
- * The value is, e.g. true
- * comment: The option 'loginLink' of page link button for search page - * @return The determination, true or false. (if not found, exception but basically no way) - */ - boolean isPageLoginLink(); - /** * Get the value for the key 'page.docboost.max.fetch.size'.
* The value is, e.g. 1000
@@ -4414,14 +4395,6 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction return is(FessConfig.PAGING_PAGE_RANGE_FILL_LIMIT); } - public String getPageLoginLink() { - return get(FessConfig.PAGE_LOGIN_LINK); - } - - public boolean isPageLoginLink() { - return is(FessConfig.PAGE_LOGIN_LINK); - } - public String getPageDocboostMaxFetchSize() { return get(FessConfig.PAGE_DOCBOOST_MAX_FETCH_SIZE); } diff --git a/src/main/java/org/codelibs/fess/mylasta/direction/FessProp.java b/src/main/java/org/codelibs/fess/mylasta/direction/FessProp.java index ef582ded2..f07166ec3 100644 --- a/src/main/java/org/codelibs/fess/mylasta/direction/FessProp.java +++ b/src/main/java/org/codelibs/fess/mylasta/direction/FessProp.java @@ -238,6 +238,14 @@ public interface FessProp { return getSystemPropertyAsBoolean(Constants.LOGIN_REQUIRED_PROPERTY, false); } + public default void setLoginLinkEnabled(final boolean value) { + setSystemPropertyAsBoolean(Constants.LOGIN_LINK_ENALBED_PROPERTY, value); + } + + public default boolean isLoginLinkEnabled() { + return getSystemPropertyAsBoolean(Constants.LOGIN_LINK_ENALBED_PROPERTY, true); + } + public default void setIncrementalCrawling(final boolean value) { setSystemPropertyAsBoolean(Constants.INCREMENTAL_CRAWLING_PROPERTY, value); } diff --git a/src/main/resources/fess_config.properties b/src/main/resources/fess_config.properties index 5e7b8c8f7..82b1b8689 100644 --- a/src/main/resources/fess_config.properties +++ b/src/main/resources/fess_config.properties @@ -291,9 +291,6 @@ paging.page.range.size = 3 # The option 'fillLimit' of page range for paging paging.page.range.fill.limit = true -# The option 'loginLink' of page link button for search page -page.login.link = true - # fetch page size page.docboost.max.fetch.size=1000 page.keymatch.max.fetch.size=1000 diff --git a/src/main/resources/fess_label.properties b/src/main/resources/fess_label.properties index 9cbf7d35d..d4ce893b8 100644 --- a/src/main/resources/fess_label.properties +++ b/src/main/resources/fess_label.properties @@ -77,6 +77,7 @@ labels.searchLog=Search Log labels.sort=Sort labels.start=Start Pos labels.loginRequired=Login Required +labels.loginLink=Login Link labels.threadName=Thread Name labels.url=URL labels.userFavorite=Favorite Log @@ -320,6 +321,7 @@ labels.default_label_value=Default Label Value labels.default_sort_value=Default Sort Value labels.append_query_param_enabled=Append Params to URL labels.login_required=Login Required +labels.login_link=Login Link labels.ignore_failure_type=Excluded Failure Type labels.failure_count_threshold=Failure Count Threshold labels.popular_word_word_enabled=Popular Word Response diff --git a/src/main/resources/fess_label_en.properties b/src/main/resources/fess_label_en.properties index 8320b9473..d20567cf3 100644 --- a/src/main/resources/fess_label_en.properties +++ b/src/main/resources/fess_label_en.properties @@ -77,6 +77,7 @@ labels.searchLog=Search Log labels.sort=Sort labels.start=Start Pos labels.loginRequired=Login Required +labels.loginLink=Login Link labels.threadName=Thread Name labels.url=URL labels.userFavorite=Favorite Log @@ -320,6 +321,7 @@ labels.default_label_value=Default Label Value labels.default_sort_value=Default Sort Value labels.append_query_param_enabled=Append Params to URL labels.login_required=Login Required +labels.login_link=Login Link labels.ignore_failure_type=Excluded Failure Type labels.failure_count_threshold=Failure Count Threshold labels.popular_word_word_enabled=Popular Word Response diff --git a/src/main/resources/fess_label_ja.properties b/src/main/resources/fess_label_ja.properties index 1c907d30d..2f9aada05 100644 --- a/src/main/resources/fess_label_ja.properties +++ b/src/main/resources/fess_label_ja.properties @@ -77,6 +77,7 @@ labels.searchLog=\u691c\u7d22\u30ed\u30b0 labels.sort=\u30bd\u30fc\u30c8 labels.start=\u30b9\u30bf\u30fc\u30c8\u4f4d\u7f6e labels.loginRequired=\u30ed\u30b0\u30a4\u30f3\u304c\u5fc5\u8981 +labels.loginLink=\u30ed\u30b0\u30a4\u30f3\u30ea\u30f3\u30af\u8868\u793a labels.threadName=\u30b9\u30ec\u30c3\u30c9\u540d labels.url=URL labels.userFavorite=\u304a\u6c17\u306b\u5165\u308a\u30ed\u30b0 @@ -316,6 +317,7 @@ labels.default_label_value=\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30e9\u30d9\u30e labels.default_sort_value=\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30bd\u30fc\u30c8\u5024 labels.append_query_param_enabled=\u691c\u7d22\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u8ffd\u52a0 labels.login_required=\u30ed\u30b0\u30a4\u30f3\u304c\u5fc5\u8981 +labels.login_link=\u30ed\u30b0\u30a4\u30f3\u30ea\u30f3\u30af\u8868\u793a labels.ignore_failure_type=\u9664\u5916\u3059\u308b\u30a8\u30e9\u30fc\u306e\u7a2e\u985e labels.failure_count_threshold=\u969c\u5bb3\u6570\u306e\u3057\u304d\u3044\u5024 labels.popular_word_word_enabled=\u4eba\u6c17\u30ef\u30fc\u30c9\u306e\u30ec\u30b9\u30dd\u30f3\u30b9 diff --git a/src/main/webapp/WEB-INF/view/admin/general/admin_general.jsp b/src/main/webapp/WEB-INF/view/admin/general/admin_general.jsp index 9acfe3a79..9fedd017b 100644 --- a/src/main/webapp/WEB-INF/view/admin/general/admin_general.jsp +++ b/src/main/webapp/WEB-INF/view/admin/general/admin_general.jsp @@ -57,6 +57,18 @@ +
+ +
+ +
+ +
+
+