more services added
This commit is contained in:
@@ -20,6 +20,8 @@ from schemas import (
|
||||
Event2Occupant,
|
||||
Application2Employee,
|
||||
RelationshipEmployee2Build,
|
||||
Events,
|
||||
EndpointRestriction,
|
||||
)
|
||||
from api_modules.token.password_module import PasswordModule
|
||||
from api_controllers.mongo.database import mongo_handler
|
||||
@@ -331,7 +333,11 @@ class LoginHandler:
|
||||
ValueError("EYS_0010")
|
||||
|
||||
# Get reachable events
|
||||
reachable_event_codes = Event2Employee.get_event_codes(employee_id=int(result_with_keys_dict['Employees.id']), db=db_session)
|
||||
# reachable_event_codes = Event2Employee.get_event_codes(employee_id=int(result_with_keys_dict['Employees.id']), db=db_session)
|
||||
# TODO: erase this bypass later
|
||||
filter_endpoints_and_events = db_session.query(EndpointRestriction.operation_uu_id, Events.function_code
|
||||
).join(EndpointRestriction, EndpointRestriction.id == Events.endpoint_id).filter().all()
|
||||
reachable_event_codes = {endpoint_name: function_code for endpoint_name, function_code in filter_endpoints_and_events}
|
||||
# Get reachable applications
|
||||
reachable_app_codes = Application2Employee.get_application_codes(employee_id=int(result_with_keys_dict['Employees.id']), db=db_session)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user