Kaynağa Gözat

Merge pull request #2331 from openNAMU/dont_use

전부 관리자 적용되는 버그 수정
잉여개발기 1 yıl önce
ebeveyn
işleme
aeaed1a750

+ 1 - 0
lang/en-US.json

@@ -37,6 +37,7 @@
     "auth_to_auth" : "Auth group to auth group",
     "vote_management_authority" : "Vote management authority",
     "bbs_management_authority" : "BBS management authority",
+    "discuss_view_authority" : "Discussion view authority",
 
     "_comment_" : "Common",
     "data" : "Data",

+ 2 - 1
lang/ko-KR.json

@@ -683,5 +683,6 @@
     "multiple_authorize" : "다중 권한 부여",
     "auth_to_auth" : "권한 그룹에서 권한 그룹으로",
     "vote_management_authority" : "투표 관리 권한",
-    "bbs_management_authority" : "BBS 관리 권한"
+    "bbs_management_authority" : "BBS 관리 권한",
+    "discuss_view_authority" : "토론 보기 권한"
 }

+ 2 - 2
route/api_user_info.py

@@ -15,9 +15,9 @@ def api_user_info(user_name = ''):
         if db_data:
             data_result['auth'] = db_data[0][0]
         elif ip_or_user(user_name) == 1:
-            data_result['auth'] = 'user'
-        else:
             data_result['auth'] = 'ip'
+        else:
+            data_result['auth'] = 'user'
 
         curs.execute(db_change("select data from user_set where id = ? and name = 'auth_date'"), [user_name])
         db_data = curs.fetchall()

+ 1 - 1
route/give_admin_groups.py

@@ -51,7 +51,7 @@ def give_admin_groups(name = 'test'):
                             [5, '', get_lang(conn, 'view_authority')],
                         [4, 'view', get_lang(conn, 'view_authority')],
                     [3, 'discuss', get_lang(conn, 'discuss_authority')],
-                        [4, 'discuss_view', get_lang(conn, 'discuss_authority')],
+                        [4, 'discuss_view', get_lang(conn, 'discuss_view_authority')],
                     [3, 'upload', get_lang(conn, 'upload_authority')],
                     [3, 'vote', get_lang(conn, 'vote_authority')],
                     [3, 'bbs_use', get_lang(conn, 'bbs_authority')],

BIN
route_go/bin/main.amd64.bin


BIN
route_go/bin/main.amd64.exe


BIN
route_go/bin/main.arm64.bin


BIN
route_go/bin/main.arm64.exe


+ 6 - 12
route_go/route/tool/acl_and_auth.go

@@ -146,20 +146,14 @@ func Get_auth_group_info(db *sql.DB, auth string) map[string]bool {
 	}
 
 	if len(data_list) == 0 {
-		data_list["not_exist"] = true
-
-		return data_list
-	} else {
-		return Check_auth(data_list)
+		data_list["nothing"] = true
 	}
+
+	return Check_auth(data_list)
 }
 
 func Auth_include_upper_auth(auth_info map[string]bool) bool {
-	if auth_info["owner"] {
-		return true
-	}
-
-	return false
+	return auth_info["owner"]
 }
 
 func Check_auth(auth_info map[string]bool) map[string]bool {
@@ -167,7 +161,7 @@ func Check_auth(auth_info map[string]bool) map[string]bool {
 		auth_info["admin"] = true
 	}
 
-	admin_auth := []string{"ban", "toron", "check", "acl", "hidel", "give", "bbs", "vote"}
+	admin_auth := []string{"ban", "toron", "check", "acl", "hidel", "give", "bbs", "vote_fix"}
 
 	if _, ok := auth_info["admin"]; ok {
 		for _, v := range admin_auth {
@@ -207,7 +201,7 @@ func Check_auth(auth_info map[string]bool) map[string]bool {
 		}
 	}
 
-	ip_default := []string{"document", "discuss", "upload", "vote", "bbs", "captcha_one_check_five_pass"}
+	ip_default := []string{"document", "discuss", "upload", "vote", "bbs_use", "captcha_one_check_five_pass"}
 
 	if _, ok := auth_info["ip"]; ok {
 		for _, v := range ip_default {

+ 1 - 1
version.json

@@ -1,6 +1,6 @@
 {
     "beta" : {
-        "r_ver" : "v3.5.0-v168",
+        "r_ver" : "v3.5.0-v169",
         "c_ver" : "20240513",
         "s_ver" : "20240426"
     }