branch-permissions: handle cases for revoking regular permissions when branch permissions are set:...
branch-permissions: handle cases for revoking regular permissions when branch permissions are set:
- DB cascade delete fliushing branch when repository is deleted
- forbid lowering permissions if it's used for branch