mirror of https://github.com/jumpserver/jumpserver
Merge pull request #3636 from jumpserver/dev_perms
[Update] 授权的 RemoteApp/DatabaseApp 进行去重pull/3638/head
commit
75a2b9eac2
|
@ -56,7 +56,7 @@ class DatabaseAppPermissionUtil:
|
||||||
def get_database_apps(self):
|
def get_database_apps(self):
|
||||||
database_apps = DatabaseApp.objects.filter(
|
database_apps = DatabaseApp.objects.filter(
|
||||||
granted_by_permissions__in=self.permissions
|
granted_by_permissions__in=self.permissions
|
||||||
)
|
).distinct()
|
||||||
return database_apps
|
return database_apps
|
||||||
|
|
||||||
def get_database_app_system_users(self, database_app):
|
def get_database_app_system_users(self, database_app):
|
||||||
|
|
|
@ -9,7 +9,6 @@ from orgs.utils import set_to_root_org
|
||||||
from ..models import RemoteAppPermission
|
from ..models import RemoteAppPermission
|
||||||
from ..hands import RemoteApp, SystemUser
|
from ..hands import RemoteApp, SystemUser
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'RemoteAppPermissionUtil',
|
'RemoteAppPermissionUtil',
|
||||||
'construct_remote_apps_tree_root',
|
'construct_remote_apps_tree_root',
|
||||||
|
@ -56,7 +55,7 @@ class RemoteAppPermissionUtil:
|
||||||
def get_remote_apps(self):
|
def get_remote_apps(self):
|
||||||
remote_apps = RemoteApp.objects.filter(
|
remote_apps = RemoteApp.objects.filter(
|
||||||
granted_by_permissions__in=self.permissions
|
granted_by_permissions__in=self.permissions
|
||||||
)
|
).distinct()
|
||||||
return remote_apps
|
return remote_apps
|
||||||
|
|
||||||
def get_remote_app_system_users(self, remote_app):
|
def get_remote_app_system_users(self, remote_app):
|
||||||
|
|
Loading…
Reference in New Issue