-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
- Do you want to request a feature or report a bug?
Feature
- What is the current behavior?
Netlify CMS allow us to pass the following options to git-gateway:
backend:
name: git-gateway
accept_roles: #optional - accepts all users if left out
- admin
- editor
now from netlify's identity settings the repository is set up:
So that means that users from that site have access to the following scopes:
/repos/:owner/:name/git/
/repos/:owner/:name/contents/
/repos/:owner/:name/pulls/
/repos/:owner/:name/branches/
- What is the expected behavior?
Mono-repository are increasingly popular and people want to have multiple sites under one git repository.
for example, it's very common to have multiple site under packages
packages/
- site1
- site2
I would like to be able to pass specific paths to git-gateway in order to restrict a user from site1 to only content of site1, something like:
/repos/:owner/:name/git/
/repos/:owner/:name/contents/packages/site1 # restrict to site1 dir only
/repos/:owner/:name/pulls/
/repos/:owner/:name/branches/
Maybe something like:
# config.yml for site 1
backend:
name: git-gateway
accept_roles:
- admin
- editor
accept_content_routes: # <------ restrict content access to those paths only
- packages/site1
# config.yml for site 2
backend:
name: git-gateway
accept_roles:
- admin
- editor
accept_content_routes: # <------ restrict content access to those paths only
- packages/site2alisalahio
Metadata
Metadata
Assignees
Labels
No labels
