mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
feat: add presences read and write scopes to API keys
This commit is contained in:
@@ -425,6 +425,18 @@ export const scopes: ScopeDefinition[] = [
|
||||
category: 'Messaging',
|
||||
icon: 'send'
|
||||
},
|
||||
{
|
||||
scope: 'presences.read',
|
||||
description: "Access to read your project's presences",
|
||||
category: 'Presences',
|
||||
icon: 'user-group'
|
||||
},
|
||||
{
|
||||
scope: 'presences.write',
|
||||
description: "Access to create, update, and delete your project's presences",
|
||||
category: 'Presences',
|
||||
icon: 'user-group'
|
||||
},
|
||||
{
|
||||
scope: 'locale.read',
|
||||
description: "Access to access your project's Locale service",
|
||||
|
||||
@@ -120,12 +120,14 @@
|
||||
try {
|
||||
const result = await sdk.forConsole.console.listProjectScopes();
|
||||
const scopesById = new Map<string, ScopeDefinition>();
|
||||
const localByScope = new Map(localScopes.map((s) => [s.scope, s]));
|
||||
|
||||
for (const scope of result.scopes) {
|
||||
const fallback = localByScope.get(scope.$id);
|
||||
scopesById.set(scope.$id, {
|
||||
scope: scope.$id,
|
||||
description: scope.description,
|
||||
category: normalizeCategory(scope.category),
|
||||
category: normalizeCategory(scope.category || fallback?.category || ''),
|
||||
deprecated: scope.deprecated,
|
||||
icon: ''
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user