Fix style

This commit is contained in:
swevm
2021-01-19 18:16:23 +01:00
parent 643e66560c
commit 861aea95ab
3 changed files with 14 additions and 13 deletions

View File

@ -139,7 +139,7 @@ class HasPermission:
async def __call__(self, resource: str = Path(...), user=Depends(get_current_user)):
if not app.permission or user.is_superuser:
return True #Hmm. Should superuser really cirumvent all permission checks. not a good practice!?!?!?!!?!!!
return True # Hmm. Should superuser really cirumvent all permission checks. not a good practice!?!?!?!!?!!!
if not user.is_active:
return False
has_permission = False
@ -154,4 +154,4 @@ class HasPermission:
has_read_permission = HasPermission(action=enums.PermissionAction.read)
has_create_permission = HasPermission(action=enums.PermissionAction.create)
has_update_permission = HasPermission(action=enums.PermissionAction.update)
has_delete_permission = HasPermission(action=enums.PermissionAction.delete)
has_delete_permission = HasPermission(action=enums.PermissionAction.delete)