|
|
@@ -6,45 +6,50 @@ def give_admin_groups(name = 'test'):
|
|
|
|
|
|
acl_name_list = [
|
|
|
[1, 'owner', get_lang(conn, 'owner_authority')],
|
|
|
- [2, '', get_lang(conn, 'all_function_authority'), True],
|
|
|
- [2, 'admin', get_lang(conn, 'admin_authority')],
|
|
|
- [3, 'ban', get_lang(conn, 'ban_authority')],
|
|
|
- [4, '', get_lang(conn, 'admin_default_feature_authority'), True],
|
|
|
- [3, 'toron', get_lang(conn, 'discussion_authority')],
|
|
|
- [4, '', get_lang(conn, 'admin_default_feature_authority'), True],
|
|
|
- [3, 'check', get_lang(conn, 'user_check_authority')],
|
|
|
- [4, '', get_lang(conn, 'admin_default_feature_authority'), True],
|
|
|
- [3, 'acl', get_lang(conn, 'document_acl_authority')],
|
|
|
- [4, '', get_lang(conn, 'admin_default_feature_authority'), True],
|
|
|
- [3, 'hidel', get_lang(conn, 'history_hide_authority')],
|
|
|
- [4, '', get_lang(conn, 'admin_default_feature_authority'), True],
|
|
|
- [3, 'give', get_lang(conn, 'authorization_authority')],
|
|
|
- [4, '', get_lang(conn, 'admin_default_feature_authority'), True],
|
|
|
- [3, 'bbs', get_lang(conn, 'bbs_authority')],
|
|
|
- [4, '', get_lang(conn, 'admin_default_feature_authority'), True],
|
|
|
- [3, 'vote', get_lang(conn, 'vote_authority')],
|
|
|
- [4, '', get_lang(conn, 'admin_default_feature_authority'), True],
|
|
|
- [3, 'admin_default_feature', get_lang(conn, 'admin_default_feature_authority')],
|
|
|
- [4, 'treat_as_admin', get_lang(conn, 'treat_as_admin_authority')],
|
|
|
- [4, 'user_name_bold', get_lang(conn, 'user_name_bold_authority')],
|
|
|
- [4, 'multiple_upload', get_lang(conn, 'multiple_upload_authority')],
|
|
|
- [4, 'slow_edit_pass', get_lang(conn, 'slow_edit_pass_authority')],
|
|
|
- [4, 'edit_bottom_compulsion_pass', get_lang(conn, 'edit_bottom_compulsion_pass_authority')],
|
|
|
- [4, '', get_lang(conn, 'user_authority'), True],
|
|
|
+ [2, '', get_lang(conn, 'all_function_authority')],
|
|
|
+ [2, 'admin', get_lang(conn, 'admin_authority')],
|
|
|
+ [3, 'ban', get_lang(conn, 'ban_authority')],
|
|
|
+ [4, '', get_lang(conn, 'admin_default_feature_authority')],
|
|
|
+ [3, 'toron', get_lang(conn, 'discussion_authority')],
|
|
|
+ [4, '', get_lang(conn, 'admin_default_feature_authority')],
|
|
|
+ [3, 'check', get_lang(conn, 'user_check_authority')],
|
|
|
+ [4, '', get_lang(conn, 'admin_default_feature_authority')],
|
|
|
+ [3, 'acl', get_lang(conn, 'document_acl_authority')],
|
|
|
+ [4, '', get_lang(conn, 'admin_default_feature_authority')],
|
|
|
+ [3, 'hidel', get_lang(conn, 'history_hide_authority')],
|
|
|
+ [4, '', get_lang(conn, 'admin_default_feature_authority')],
|
|
|
+ [3, 'give', get_lang(conn, 'authorization_authority')],
|
|
|
+ [4, '', get_lang(conn, 'admin_default_feature_authority')],
|
|
|
+ [3, 'bbs', get_lang(conn, 'bbs_authority')],
|
|
|
+ [4, '', get_lang(conn, 'admin_default_feature_authority')],
|
|
|
+ [3, 'vote', get_lang(conn, 'vote_authority')],
|
|
|
+ [4, '', get_lang(conn, 'admin_default_feature_authority')],
|
|
|
+ [3, 'admin_default_feature', get_lang(conn, 'admin_default_feature_authority')],
|
|
|
+ [4, 'treat_as_admin', get_lang(conn, 'treat_as_admin_authority')],
|
|
|
+ [4, 'user_name_bold', get_lang(conn, 'user_name_bold_authority')],
|
|
|
+ [4, 'multiple_upload', get_lang(conn, 'multiple_upload_authority')],
|
|
|
+ [4, 'slow_edit_pass', get_lang(conn, 'slow_edit_pass_authority')],
|
|
|
+ [4, 'edit_bottom_compulsion_pass', get_lang(conn, 'edit_bottom_compulsion_pass_authority')],
|
|
|
+ [4, '', get_lang(conn, 'user_authority')],
|
|
|
[1, 'user', get_lang(conn, 'user_authority')],
|
|
|
- [2, 'captcha_pass', get_lang(conn, 'captcha_pass_authority')],
|
|
|
- [2, 'ip', get_lang(conn, 'ip_authority')],
|
|
|
- [3, 'view', get_lang(conn, 'view_authority')],
|
|
|
- [4, 'document', get_lang(conn, 'document_authority')],
|
|
|
- [5, 'edit', get_lang(conn, 'edit_authority')],
|
|
|
- [5, 'move', get_lang(conn, 'move_authority')],
|
|
|
- [5, 'new_make', get_lang(conn, 'new_make_authority')],
|
|
|
- [5, 'delete', get_lang(conn, 'delete_authority')],
|
|
|
- [4, 'edit_request', get_lang(conn, 'edit_request_authority')],
|
|
|
- [4, 'discuss', get_lang(conn, 'discuss_authority')],
|
|
|
- [4, 'upload', get_lang(conn, 'upload_authority')],
|
|
|
- [4, 'vote', get_lang(conn, 'vote_authority')],
|
|
|
- [4, 'captcha_one_check_five_pass', get_lang(conn, 'captcha_one_check_five_pass_authority')]
|
|
|
+ [2, 'captcha_pass', get_lang(conn, 'captcha_pass_authority')],
|
|
|
+ [2, 'ip', get_lang(conn, 'ip_authority')],
|
|
|
+ [3, 'document', get_lang(conn, 'document_authority')],
|
|
|
+ [4, 'edit', get_lang(conn, 'edit_authority')],
|
|
|
+ [5, '', get_lang(conn, 'view_authority')],
|
|
|
+ [4, 'edit_request', get_lang(conn, 'edit_request_authority')],
|
|
|
+ [5, '', get_lang(conn, 'view_authority')],
|
|
|
+ [4, 'move', get_lang(conn, 'move_authority')],
|
|
|
+ [5, '', get_lang(conn, 'view_authority')],
|
|
|
+ [4, 'new_make', get_lang(conn, 'new_make_authority')],
|
|
|
+ [5, '', get_lang(conn, 'view_authority')],
|
|
|
+ [4, 'delete', get_lang(conn, 'delete_authority')],
|
|
|
+ [5, '', get_lang(conn, 'view_authority')],
|
|
|
+ [4, 'view', get_lang(conn, 'view_authority')],
|
|
|
+ [3, 'discuss', get_lang(conn, 'discuss_authority')],
|
|
|
+ [3, 'upload', get_lang(conn, 'upload_authority')],
|
|
|
+ [3, 'vote', get_lang(conn, 'vote_authority')],
|
|
|
+ [3, 'captcha_one_check_five_pass', get_lang(conn, 'captcha_one_check_five_pass_authority')]
|
|
|
]
|
|
|
|
|
|
if flask.request.method == 'POST':
|
|
|
@@ -70,12 +75,11 @@ def give_admin_groups(name = 'test'):
|
|
|
acl_list = [for_a[0] for for_a in acl_list]
|
|
|
|
|
|
checked = ''
|
|
|
- if for_a[1] in acl_list:
|
|
|
- checked = 'checked'
|
|
|
-
|
|
|
choice = '<input type="checkbox" ' + state + ' name="' + for_a[1] + '" ' + checked + '> ' + for_a[2]
|
|
|
- if len(for_a) == 4:
|
|
|
+ if for_a[1] == '':
|
|
|
choice = for_a[2]
|
|
|
+ elif for_a[1] in acl_list:
|
|
|
+ checked = 'checked'
|
|
|
|
|
|
data += '' + \
|
|
|
'<li class="opennamu_list_1" style="margin-left: ' + str(int(for_a[0]) * 20) + 'px;">' + \
|