mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-10-23 00:38:39 +00:00
[Update] 修改get_current_org 为 proxy对象 current_org
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
|
||||
from .utils import get_current_org
|
||||
from .utils import current_org, get_current_org
|
||||
from .models import Organization
|
||||
|
||||
|
||||
def org_processor(request):
|
||||
print('Crernt Org', current_org.name)
|
||||
context = {
|
||||
'ADMIN_ORGS': Organization.get_user_admin_orgs(request.user),
|
||||
'CURRENT_ORG': get_current_org(),
|
||||
'HAS_ORG_PERM': current_org.can_admin_by(request.user),
|
||||
}
|
||||
return context
|
||||
|
||||
|
Reference in New Issue
Block a user