fix: 去除change_setting权限位

pull/7866/head
Jiangjie.Bai 2022-03-15 20:23:22 +08:00 committed by Jiangjie.Bai
parent 4bfa88f01f
commit d320443c9f
7 changed files with 6 additions and 7 deletions

View File

@ -55,7 +55,7 @@ exclude_permissions = (
('ops', 'task', 'add,change', 'task'),
('ops', 'commandexecution', 'delete,change', 'commandexecution'),
('orgs', 'organizationmember', '*', '*'),
('settings', 'setting', 'add,delete', 'setting'),
('settings', 'setting', 'add,change,delete', 'setting'),
('audits', 'operatelog', 'add,delete,change', 'operatelog'),
('audits', 'passwordchangelog', 'add,change,delete', 'passwordchangelog'),
('audits', 'userloginlog', 'add,change,delete,change', 'userloginlog'),

View File

@ -99,7 +99,6 @@ special_pid_mapper = {
"xpack.interface": "view_setting",
"settings.change_terminal": "terminal_node",
"settings.view_setting": "view_setting",
"settings.change_setting": "view_setting",
"rbac.view_console": "view_console",
"rbac.view_audit": "view_audit",
"rbac.view_workspace": "view_workspace",

View File

@ -14,7 +14,7 @@ from .. import serializers
class AlibabaSMSTestingAPI(GenericAPIView):
serializer_class = serializers.AlibabaSMSSettingSerializer
rbac_perms = {
'POST': 'settings.change_setting'
'POST': 'settings.change_sms'
}
def post(self, request):

View File

@ -19,7 +19,7 @@ class MailTestingAPI(APIView):
serializer_class = serializers.MailTestSerializer
success_message = _("Test mail sent to {}, please check")
rbac_perms = {
'POST': 'settings.change_setting'
'POST': 'settings.change_email'
}
def post(self, request):

View File

@ -13,7 +13,7 @@ from .. import serializers
class FeiShuTestingAPI(GenericAPIView):
serializer_class = serializers.FeiShuSettingSerializer
rbac_perms = {
'POST': 'settings.change_setting'
'POST': 'settings.change_auth'
}
def post(self, request):

View File

@ -16,7 +16,7 @@ from .. import serializers
class TencentSMSTestingAPI(GenericAPIView):
serializer_class = serializers.TencentSMSSettingSerializer
rbac_perms = {
'POST': 'settings.change_setting'
'POST': 'settings.change_sms'
}
def post(self, request):

View File

@ -13,7 +13,7 @@ from .. import serializers
class WeComTestingAPI(GenericAPIView):
serializer_class = serializers.WeComSettingSerializer
rbac_perms = {
'POST': 'settings.change_setting'
'POST': 'settings.change_auth'
}
def post(self, request):