- Partner model additions
- menu changes to allow for partners - partner views and forms now in partner_forms.py and partner_views.py - Introduction of services layer - Allow all configuration to handle partner configurations, and adaptation of caching to allow for this
This commit is contained in:
@@ -8,7 +8,7 @@ from flask import session, current_app, redirect
|
||||
from .database import Database
|
||||
from .eveai_exceptions import EveAINoSessionTenant, EveAINoSessionPartner, EveAINoManagementPartnerService, \
|
||||
EveAINoManagementPartnerForTenant
|
||||
from ..services.tenant_service import TenantService
|
||||
from ..services.user_services import UserServices
|
||||
|
||||
|
||||
def mw_before_request():
|
||||
@@ -36,7 +36,7 @@ def mw_before_request():
|
||||
if service.get('type') == 'MANAGEMENT_SERVICE'), None)
|
||||
if not management_service:
|
||||
raise EveAINoManagementPartnerService()
|
||||
if not TenantService.can_user_edit_tenant(tenant_id):
|
||||
if not UserServices.can_user_edit_tenant(tenant_id):
|
||||
raise EveAINoManagementPartnerForTenant()
|
||||
|
||||
Database(tenant_id).switch_schema()
|
||||
|
||||
Reference in New Issue
Block a user