diff --git a/app/config/roles.php b/app/config/roles.php index 506b2403c6..78dd24ad45 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -2,7 +2,7 @@ use Appwrite\Auth\Auth; -$logged = [ +$member = [ 'public', 'home', 'console', @@ -66,7 +66,7 @@ return [ ], Auth::USER_ROLE_MEMBER => [ 'label' => 'Member', - 'scopes' => \array_merge($logged, []), + 'scopes' => \array_merge($member, []), ], Auth::USER_ROLE_ADMIN => [ 'label' => 'Admin', @@ -78,7 +78,7 @@ return [ ], Auth::USER_ROLE_OWNER => [ 'label' => 'Owner', - 'scopes' => \array_merge($logged, $admins, []), + 'scopes' => \array_merge($member, $admins, []), ], Auth::USER_ROLE_APP => [ 'label' => 'Application', diff --git a/docs/specs/authentication.drawio.svg b/docs/specs/authentication.drawio.svg new file mode 100644 index 0000000000..c7958fa22b --- /dev/null +++ b/docs/specs/authentication.drawio.svg @@ -0,0 +1,159 @@ + + + + + + + + + + + + + Session Cookie + + + + + + Session Cookie + + + + + + + + + + + + + Email / Password + + + + + + Email / Password + + + + + + + + + + + + + OAuth Provider + + + + + + OAuth Provider + + + + + + + + + + + Member + + + + + + Member + + + + + + + + + + + App + + + + + + App + + + + + + + + + + + + + JWT + + + + + + JWT + + + + + + + + + + + + + AP Key + + + + + + AP Key + + + + + + + + + + + Guest + + + + + + Guest + + + + + + + + + Viewer does not support full SVG 1.1 + + + + \ No newline at end of file diff --git a/docs/specs/overview.drawio.svg b/docs/specs/overview.drawio.svg index 7b376f6604..5f6c161004 100644 --- a/docs/specs/overview.drawio.svg +++ b/docs/specs/overview.drawio.svg @@ -1 +1,651 @@ -WebWebFlutterFlutteriOSiOSAndroidAndroidServersServersAppwriteAppwriteLoadbalancerLoadbalancerConsoleConsoleAPIsAPIsPub/Sub (Redis)Pub/Sub (Redis)Cache (Redis)Cache (Redis)Database (MariaDB)Database (MariaDB)UsersUsersAccountAccountTeamsTeamsDatabaseDatabaseStorageStorageLocalizationLocalizationAvatarsAvatarsHealthHealthSSL GatewaySSL GatewayDeletesDeletesSecurity LayerSecurity LayerUsageUsageAuditsAuditsMailsMailsSMTPSMTPTasksTasksWebhooksWebhooksFunctionsFunctionsDockerDockerStatsD (Telegraf)StatsD (Telegraf)TimeSeries (InfluxDB)TimeSeries (InfluxDB)CertsCertsSchedulerSchedulerLetsencryptLetsencryptAntiVirus (ClamAV)AntiVirus (ClamAV)Viewer does not support full SVG 1.1 \ No newline at end of file + + + + + + + + + + + + + Session Cookie + + + + + + Session Cookie + + + + + + + + + + + + + Email / Password + + + + + + Email / Password + + + + + + + + + + + + + OAuth Provider + + + + + + OAuth Provider + + + + + + + + + + + + Granted with + + + + + + Granted with + + + + + + + + + + + Member + + + + + + Member + + + + + + + + + + + + Granted with + + + + + + Granted with + + + + + + + + + + + App + + + + + + App + + + + + + + + + + + + + JWT + + + + + + JWT + + + + + + + + + + + + + AP Key + + + + + + AP Key + + + + + + + + + + + + Granted with + + + + + + Granted with + + + + + + + + + + + Guest + + + + + + Guest + + + + + + + + + + + + + Public Scopes + + + + + + Public Scopes + + + + + + + + + + + + + Member Scopes + + + + + + Member Scopes + + + + + + + + + + + + + Custom Scopes + + + (Defined on key creation) + + + + + + + Custom Scopes... + + + + + + + + + + + Scope Validation + + + + + + Scope Validation + + + + + + + + + + + + + + + + + Database + + + Each doc has permission + + + + + + + Database... + + + + + + + + + + + Roles Validation + + + + + + Roles Validation + + + + + + + + + + + + + Roles + + + + + + Roles + + + + + + + + + + + + + Wildcard + + * + + + + + + Wildcard... + + + + + + + + + + + + + Guset + + role:guest + + + + + + Guset... + + + + + + + + + + + + + Member + + role:member + + + + + + Member... + + + + + + + + + + + + + App + + role:app + + + + + + App... + + + + + + + + + + + User ID + + user:[ID] + + + + + + User ID... + + + + + + + + + + + + + Team ID + + team:[ID] + + + + + + Team ID... + + + + + + + + + + + + + Team ID + Role + + team:[ID]/[ROLE] + + + + + + Team ID + Role... + + + + + + + + + + + Member ID + + member:[ID] + + + + + + Member ID... + + + + + + + + + + + Endpoints + + + Each endpoint has 1 scope + + + + + + + Endpoints... + + + + + + + + + + + + + Scopes + + + + + + Scopes + + + + + + + + + + + + + public + + + + + + public + + + + + + + + + + + + + account + + + + + + account + + + + + + + + + + + + + files.read + + + + + + files.read + + + + + + + + + + + files.write + + + + + + files.write + + + + + + + + + + + + ... + + + + + + + ... + + + + + + + + + Viewer does not support full SVG 1.1 + + + + \ No newline at end of file