Merge pull request #3636 from jumpserver/dev_perms

[Update] 授权的 RemoteApp/DatabaseApp 进行去重
pull/3638/head
BaiJiangJie 2020-01-13 18:57:33 +08:00 committed by GitHub
commit 75a2b9eac2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -56,7 +56,7 @@ class DatabaseAppPermissionUtil:
def get_database_apps(self):
database_apps = DatabaseApp.objects.filter(
granted_by_permissions__in=self.permissions
)
).distinct()
return database_apps
def get_database_app_system_users(self, database_app):

View File

@ -9,7 +9,6 @@ from orgs.utils import set_to_root_org
from ..models import RemoteAppPermission
from ..hands import RemoteApp, SystemUser
__all__ = [
'RemoteAppPermissionUtil',
'construct_remote_apps_tree_root',
@ -56,7 +55,7 @@ class RemoteAppPermissionUtil:
def get_remote_apps(self):
remote_apps = RemoteApp.objects.filter(
granted_by_permissions__in=self.permissions
)
).distinct()
return remote_apps
def get_remote_app_system_users(self, remote_app):