|
|
@@ -185,7 +185,7 @@ func Check_auth(auth_info map[string]bool) map[string]bool {
|
|
|
auth_info["admin_default_feature"] = true
|
|
|
}
|
|
|
|
|
|
- admin_default_feature := []string{"treat_as_admin", "user_name_bold", "multiple_upload", "slow_edit_pass", "edit_bottom_compulsion_pass", "view_hide_user_name", "doc_watch_list_view", "user"}
|
|
|
+ admin_default_feature := []string{"treat_as_admin", "user_name_bold", "multiple_upload", "slow_edit_pass", "edit_bottom_compulsion_pass", "view_hide_user_name", "doc_watch_list_view", "edit_filter_pass", "user"}
|
|
|
|
|
|
if _, ok := auth_info["admin_default_feature"]; ok {
|
|
|
for _, v := range admin_default_feature {
|
|
|
@@ -201,7 +201,7 @@ func Check_auth(auth_info map[string]bool) map[string]bool {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- ip_default := []string{"document", "discuss", "upload", "vote", "bbs_use", "captcha_one_check_five_pass"}
|
|
|
+ ip_default := []string{"document", "discuss", "upload", "vote", "bbs_use", "captcha_one_check_five_pass", "edit_filter_view"}
|
|
|
|
|
|
if _, ok := auth_info["ip"]; ok {
|
|
|
for _, v := range ip_default {
|
|
|
@@ -795,6 +795,22 @@ func Check_acl(db *sql.DB, name string, topic_number string, tool string, ip str
|
|
|
} else {
|
|
|
acl_data = "owner"
|
|
|
}
|
|
|
+ } else if tool == "edit_filter_pass" {
|
|
|
+ acl_pass_auth = "admin_default_feature"
|
|
|
+
|
|
|
+ if auth_info["edit_filter_pass"] {
|
|
|
+ acl_data = ""
|
|
|
+ } else {
|
|
|
+ acl_data = "owner"
|
|
|
+ }
|
|
|
+ } else if tool == "edit_filter_view" {
|
|
|
+ acl_pass_auth = "edit_filter_pass"
|
|
|
+
|
|
|
+ if auth_info["edit_filter_view"] {
|
|
|
+ acl_data = ""
|
|
|
+ } else {
|
|
|
+ acl_data = "owner"
|
|
|
+ }
|
|
|
} else if tool == "view_hide_user_name" {
|
|
|
acl_pass_auth = "admin_default_feature"
|
|
|
|