This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/auth/scopes.py

26 lines
926 B
Python
Raw Normal View History

2014-03-12 16:37:06 +00:00
READ_REPO = {
'scope': 'repo:read',
'description': ('Grants read-only access to all repositories for which the granting user or '
' robot has access.')
}
WRITE_REPO = {
'scope': 'repo:write',
'description': ('Grants read-write access to all repositories for which the granting user or '
'robot has access, and is a superset of repo:read.')
}
ADMIN_REPO = {
'scope': 'repo:admin',
'description': ('Grants administrator access to all repositories for which the granting user or '
'robot has access, and is a superset of repo:read and repo:write.')
}
CREATE_REPO = {
'scope': 'repo:create',
'description': ('Grants create repository access to all namespaces for which the granting user '
'or robot is allowed to create repositories.')
}
ALL_SCOPES = {scope['scope']:scope for scope in (READ_REPO, WRITE_REPO, ADMIN_REPO, CREATE_REPO)}