mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 15:11:27 +00:00
[Update] 修改一个bug
This commit is contained in:
@@ -93,8 +93,6 @@ class Organization(models.Model):
|
||||
|
||||
@classmethod
|
||||
def get_user_admin_orgs(cls, user):
|
||||
if cls._user_admin_orgs and user.id in cls._user_admin_orgs:
|
||||
return cls._user_admin_orgs[user.id]
|
||||
admin_orgs = []
|
||||
if user.is_anonymous:
|
||||
return admin_orgs
|
||||
@@ -103,11 +101,6 @@ class Organization(models.Model):
|
||||
admin_orgs.append(cls.default())
|
||||
elif user.is_org_admin:
|
||||
admin_orgs = user.admin_orgs.all()
|
||||
|
||||
if cls._user_admin_orgs is None:
|
||||
cls._user_admin_orgs = {user.id: admin_orgs}
|
||||
else:
|
||||
cls._user_admin_orgs[user.id] = admin_orgs
|
||||
return admin_orgs
|
||||
|
||||
@classmethod
|
||||
|
Reference in New Issue
Block a user