def assert_request_user_is_admin(request):
 is_admin = request_user_is_admin(request=request)
 if (not is_admin):
  user_db = get_user_db_from_request(request=request)
  raise AccessDeniedError(message='Administrator access required', user_db=user_db)

def assert_request_user_is_admin ( request ) : is_admin = request_user_is_admin ( request = request ) if ( not is_admin ) : user_db = get_user_db_from_request ( request = request ) raise AccessDeniedError ( message = 'Administrator access required' , user_db = user_db )
assert that the currently logged in user is an administrator .