perf: 设置默认的角色,系统用户角色添加权限 (#7898)

* perf: 修改 role handler

* perf: 设置默认的角色,系统用户角色添加权限

* perf: authentication 还是放到系统中吧

Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: Jiangjie.Bai <32935519+BaiJiangJie@users.noreply.github.com>
This commit is contained in:
fit2bot
2022-03-17 14:08:16 +08:00
committed by GitHub
parent 8fe84345e4
commit 34e75099a3
9 changed files with 61 additions and 33 deletions

View File

@@ -41,13 +41,3 @@ class PermissionViewSet(JMSModelViewSet):
queryset = Permission.get_permissions(self.scope)
queryset = queryset.prefetch_related('content_type')
return queryset
# class UserPermsApi(ListAPIView):
# serializer_class = UserPermsSerializer
# permission_classes = (IsValidUser,)
#
# def list(self, request, *args, **kwargs):
# perms = RoleBinding.get_user_perms(request.user)
# serializer = super().get_serializer(data={'perms': perms})
# return Res