mirror of https://github.com/jumpserver/jumpserver
perf: remove org api scope
parent
5594b25ae0
commit
22788ff2da
|
@ -122,7 +122,7 @@ class LabelRelatedField(serializers.RelatedField):
|
|||
from labels.models import LabeledResource, Label
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, dict) and data.get("id") or data.get("pk"):
|
||||
if isinstance(data, dict) and (data.get("id") or data.get("pk")):
|
||||
pk = data.get("id") or data.get("pk")
|
||||
label = Label.objects.get(pk=pk)
|
||||
else:
|
||||
|
|
|
@ -24,7 +24,7 @@ class RoleViewSet(JMSModelViewSet):
|
|||
}
|
||||
ordering = ('-builtin', 'name')
|
||||
filterset_class = RoleFilter
|
||||
search_fields = ('name', 'scope', 'builtin')
|
||||
search_fields = ('name', 'builtin')
|
||||
rbac_perms = {
|
||||
'users': 'rbac.view_rolebinding'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue