mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-16 23:38:36 +00:00
perf: 修改 rbac tree (#7743)
* perf: 修改 rbac tree * perf: 修改verbose name * fix: 修复系统用户 * fix: 还原 xpack Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
@@ -28,7 +28,7 @@ __all__ = [
|
||||
]
|
||||
|
||||
|
||||
class GrantedApplicationSystemUsersMixin(ListAPIView):
|
||||
class BaseGrantedApplicationSystemUsersApi(ListAPIView):
|
||||
serializer_class = serializers.ApplicationSystemUserSerializer
|
||||
only_fields = serializers.ApplicationSystemUserSerializer.Meta.only_fields
|
||||
user: None
|
||||
@@ -45,11 +45,11 @@ class GrantedApplicationSystemUsersMixin(ListAPIView):
|
||||
return system_users
|
||||
|
||||
|
||||
class UserGrantedApplicationSystemUsersApi(RoleAdminMixin, GrantedApplicationSystemUsersMixin):
|
||||
class UserGrantedApplicationSystemUsersApi(RoleAdminMixin, BaseGrantedApplicationSystemUsersApi):
|
||||
pass
|
||||
|
||||
|
||||
class MyGrantedApplicationSystemUsersApi(RoleUserMixin, GrantedApplicationSystemUsersMixin):
|
||||
class MyGrantedApplicationSystemUsersApi(RoleUserMixin, BaseGrantedApplicationSystemUsersApi):
|
||||
pass
|
||||
|
||||
|
||||
|
@@ -23,6 +23,6 @@ class RoleUserMixin(_RoleUserMixin):
|
||||
('GET', 'perms.view_myapps'),
|
||||
)
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
def dispatch(self, *args, **kwargs):
|
||||
with tmp_to_root_org():
|
||||
return super().get(request, *args, **kwargs)
|
||||
return super().dispatch(*args, **kwargs)
|
Reference in New Issue
Block a user