Commit bde92b20 authored by jym503558564's avatar jym503558564

[Update] 修改小问题

parent 2391ce2d
...@@ -234,7 +234,7 @@ class CommandExecutionListView(UserCommandExecutionListView): ...@@ -234,7 +234,7 @@ class CommandExecutionListView(UserCommandExecutionListView):
return queryset return queryset
def get_user_list(self): def get_user_list(self):
users = current_org.get_org_members_exclude_anditors() users = current_org.get_org_members_exclude_auditors()
return users return users
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
......
...@@ -39,7 +39,7 @@ class AssetPermissionForm(OrgModelForm): ...@@ -39,7 +39,7 @@ class AssetPermissionForm(OrgModelForm):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
users_field = self.fields.get('users') users_field = self.fields.get('users')
users_field.queryset = current_org.get_org_members_exclude_anditors() users_field.queryset = current_org.get_org_members_exclude_auditors()
nodes_field = self.fields['nodes'] nodes_field = self.fields['nodes']
nodes_field.choices = ((n.id, n.full_value) for n in Node.get_queryset()) nodes_field.choices = ((n.id, n.full_value) for n in Node.get_queryset())
......
...@@ -19,7 +19,7 @@ class RemoteAppPermissionCreateUpdateForm(OrgModelForm): ...@@ -19,7 +19,7 @@ class RemoteAppPermissionCreateUpdateForm(OrgModelForm):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
users_field = self.fields.get('users') users_field = self.fields.get('users')
if hasattr(users_field, 'queryset'): if hasattr(users_field, 'queryset'):
users_field.queryset = current_org.get_org_members_exclude_anditors() users_field.queryset = current_org.get_org_members_exclude_auditors()
class Meta: class Meta:
model = RemoteAppPermission model = RemoteAppPermission
......
...@@ -135,7 +135,7 @@ class AssetPermissionUserView(PermissionsMixin, ...@@ -135,7 +135,7 @@ class AssetPermissionUserView(PermissionsMixin,
context = { context = {
'app': _('Perms'), 'app': _('Perms'),
'action': _('Asset permission user list'), 'action': _('Asset permission user list'),
'users_remain': current_org.get_org_members_exclude_anditors().exclude( 'users_remain': current_org.get_org_members_exclude_auditors().exclude(
assetpermission=self.object assetpermission=self.object
), ),
'user_groups_remain': UserGroup.objects.exclude( 'user_groups_remain': UserGroup.objects.exclude(
......
...@@ -107,7 +107,7 @@ class RemoteAppPermissionUserView(PermissionsMixin, ...@@ -107,7 +107,7 @@ class RemoteAppPermissionUserView(PermissionsMixin,
context = { context = {
'app': _('Perms'), 'app': _('Perms'),
'action': _('RemoteApp permission user list'), 'action': _('RemoteApp permission user list'),
'users_remain': current_org.get_org_members_exclude_anditors().exclude( 'users_remain': current_org.get_org_members_exclude_auditors().exclude(
remoteapppermission=self.object remoteapppermission=self.object
), ),
'user_groups_remain': UserGroup.objects.exclude( 'user_groups_remain': UserGroup.objects.exclude(
......
...@@ -76,7 +76,7 @@ class UserGroupDetailView(PermissionsMixin, DetailView): ...@@ -76,7 +76,7 @@ class UserGroupDetailView(PermissionsMixin, DetailView):
permission_classes = [IsOrgAdmin] permission_classes = [IsOrgAdmin]
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
users = current_org.get_org_members_exclude_anditors().exclude(id__in=self.object.users.all()) users = current_org.get_org_members_exclude_auditors().exclude(id__in=self.object.users.all())
context = { context = {
'app': _('Users'), 'app': _('Users'),
'action': _('User group detail'), 'action': _('User group detail'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment