mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix scopes
This commit is contained in:
@@ -19,6 +19,7 @@ $member = [
|
||||
'files.read',
|
||||
'files.write',
|
||||
'projects.read',
|
||||
'organization.projects.read',
|
||||
'locale.read',
|
||||
'avatars.read',
|
||||
'executions.read',
|
||||
@@ -64,6 +65,7 @@ $admins = [
|
||||
'templates.read',
|
||||
'templates.write',
|
||||
'projects.write',
|
||||
'organization.projects.write',
|
||||
'keys.read',
|
||||
'keys.write',
|
||||
'devKeys.read',
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
// List of scopes for organization (teams) API keys
|
||||
|
||||
return [
|
||||
"projects.read" => [
|
||||
"organization.projects.read" => [
|
||||
"description" => 'Access to read organization\'s projects',
|
||||
],
|
||||
"projects.write" => [
|
||||
"organization.projects.write" => [
|
||||
"description" =>
|
||||
"Access to create, update, and delete projects in organization",
|
||||
],
|
||||
|
||||
@@ -47,7 +47,7 @@ class Create extends Action
|
||||
->groups(['api', 'projects'])
|
||||
->label('audits.event', 'projects.create')
|
||||
->label('audits.resource', 'project/{response.$id}')
|
||||
->label('scope', 'projects.write')
|
||||
->label('scope', 'organization.projects.write')
|
||||
->label('sdk', new Method(
|
||||
namespace: 'projects',
|
||||
group: 'projects',
|
||||
|
||||
@@ -28,7 +28,7 @@ class Get extends Action
|
||||
->setHttpPath('/v1/organizations/:organizationId/projects/:projectId')
|
||||
->desc('Get project')
|
||||
->groups(['api', 'project'])
|
||||
->label('scope', 'projects.read')
|
||||
->label('scope', 'organization.projects.read')
|
||||
->label('sdk', new Method(
|
||||
namespace: 'project',
|
||||
group: null,
|
||||
|
||||
@@ -31,7 +31,7 @@ class Update extends Action
|
||||
->httpAlias('/v1/projects/:projectId')
|
||||
->desc('Update project')
|
||||
->groups(['api', 'projects'])
|
||||
->label('scope', 'projects.write')
|
||||
->label('scope', 'organization.projects.write')
|
||||
->label('audits.event', 'projects.update')
|
||||
->label('audits.resource', 'project/{request.projectId}')
|
||||
->label('sdk', new Method(
|
||||
|
||||
@@ -48,7 +48,7 @@ class XList extends Action
|
||||
->httpAlias('/v1/projects')
|
||||
->desc('List projects')
|
||||
->groups(['api', 'projects'])
|
||||
->label('scope', 'projects.read')
|
||||
->label('scope', 'organization.projects.read')
|
||||
->label('sdk', new Method(
|
||||
namespace: 'projects',
|
||||
group: 'projects',
|
||||
|
||||
Reference in New Issue
Block a user