2018-07-12 16:00:35 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
|
|
|
|
2019-06-21 09:09:18 +00:00
|
|
|
from .utils import current_org, get_org_from_request
|
2018-07-12 16:00:35 +00:00
|
|
|
from .models import Organization
|
|
|
|
|
|
|
|
|
|
|
|
def org_processor(request):
|
|
|
|
context = {
|
2019-09-12 10:56:26 +00:00
|
|
|
# 'ADMIN_ORGS': request.user.admin_orgs,
|
|
|
|
# 'AUDIT_ORGS': request.user.audit_orgs,
|
|
|
|
'ADMIN_OR_AUDIT_ORGS': Organization.get_user_admin_or_audit_orgs(request.user),
|
2019-06-21 09:09:18 +00:00
|
|
|
'CURRENT_ORG': get_org_from_request(request),
|
2019-09-12 10:56:26 +00:00
|
|
|
# 'HAS_ORG_PERM': current_org.can_admin_by(request.user),
|
2018-07-12 16:00:35 +00:00
|
|
|
}
|
|
|
|
return context
|
|
|
|
|