Skip to content

Commit

Permalink
Restore error message for branch perm
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazoyer committed Nov 25, 2024
1 parent 29d9d34 commit b2cffdb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/infrahub/api/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,10 @@ async def load_schema(
if has_permission and has_branch_permission:
break

if not has_permission or not has_branch_permission:
if not has_permission:
raise PermissionDeniedError("You are not allowed to manage the schema")
if not has_branch_permission:
raise PermissionDeniedError("You are not allowed to edit the schema in the default branch")

service: InfrahubServices = request.app.state.service
log.info("schema_load_request", branch=branch.name)
Expand Down

0 comments on commit b2cffdb

Please sign in to comment.