mirror of
https://codeberg.org/yeentown/barkey
synced 2024-12-22 20:00:01 +00:00
Merge pull request from GHSA-7pxq-6xx9-xpgm
* fix: fix improper authorization when accessing with third-party application
* refactor: refactor type definitions
* fix: get rid of unnecessary access limitation
* enhance: サードパーティアプリケーションがWebsocket APIを使えるように
* fix: add missing parentheses
* Revert "fix(backend): add missing kind definition for admin endpoints to improve security"
This reverts commit 5150053275
.
* frontend: 翻訳の抜けを訂正, read:adminとwrite:adminはアクセス発行トークンのデフォルトでは非表示にする
* enhance(test): misskey-ghsa-7pxq-6xx9-xpgmに関するテストを追加
* enhance(test): Websocket APIに対するテストも追加
* enhance(refactor): `@/misc/api-permissions.ts`を`misskey-js/permissions`に統合
* fix(frontend): アクセストークン発行UIで全ての権限を有効にした際、管理者用APIへのアクセスも許可してしまう問題を修正
* enhance(backend): Websocketの接続に最低限必要な権限を変更
* fix(backend): `/api/admin/meta`をサードパーティアプリケーションからはアクセスできないように
* fix(backend): エンドポイントにアクセスするために必要な権限を変更
* fix(frontend/locale): Add missing type declaration
* chore: update `misskey-js/src/autogen`
---------
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
This commit is contained in:
parent
d87fecda7f
commit
c96bc36fed
148 changed files with 797 additions and 581 deletions
|
@ -132,7 +132,6 @@
|
|||
- Fix: モデレーションログがモデレーターは閲覧できないように修正
|
||||
- Fix: ハッシュタグのトレンド除外設定が即時に効果を持つように修正
|
||||
- Fix: HTTP Digestヘッダのアルゴリズム部分に大文字の"SHA-256"しか使えない
|
||||
- Fix: 管理者用APIのアクセス権限が適切に設定されていない問題を修正
|
||||
|
||||
## 2023.11.1
|
||||
|
||||
|
|
49
locales/index.d.ts
vendored
49
locales/index.d.ts
vendored
|
@ -2066,6 +2066,55 @@ export interface Locale {
|
|||
"write:flash": string;
|
||||
"read:flash-likes": string;
|
||||
"write:flash-likes": string;
|
||||
"read:admin:abuse-user-reports": string;
|
||||
"write:admin:delete-account": string;
|
||||
"write:admin:delete-all-files-of-a-user": string;
|
||||
"read:admin:index-stats": string;
|
||||
"read:admin:table-stats": string;
|
||||
"read:admin:user-ips": string;
|
||||
"read:admin:meta": string;
|
||||
"write:admin:reset-password": string;
|
||||
"write:admin:resolve-abuse-user-report": string;
|
||||
"write:admin:send-email": string;
|
||||
"read:admin:server-info": string;
|
||||
"read:admin:show-moderation-log": string;
|
||||
"read:admin:show-user": string;
|
||||
"read:admin:show-users": string;
|
||||
"write:admin:suspend-user": string;
|
||||
"write:admin:unset-user-avatar": string;
|
||||
"write:admin:unset-user-banner": string;
|
||||
"write:admin:unsuspend-user": string;
|
||||
"write:admin:meta": string;
|
||||
"write:admin:user-note": string;
|
||||
"write:admin:roles": string;
|
||||
"read:admin:roles": string;
|
||||
"write:admin:relays": string;
|
||||
"read:admin:relays": string;
|
||||
"write:admin:invite-codes": string;
|
||||
"read:admin:invite-codes": string;
|
||||
"write:admin:announcements": string;
|
||||
"read:admin:announcements": string;
|
||||
"write:admin:avatar-decorations": string;
|
||||
"read:admin:avatar-decorations": string;
|
||||
"write:admin:federation": string;
|
||||
"write:admin:account": string;
|
||||
"read:admin:account": string;
|
||||
"write:admin:emoji": string;
|
||||
"read:admin:emoji": string;
|
||||
"write:admin:queue": string;
|
||||
"read:admin:queue": string;
|
||||
"write:admin:promo": string;
|
||||
"write:admin:drive": string;
|
||||
"read:admin:drive": string;
|
||||
"read:admin:stream": string;
|
||||
"write:admin:ad": string;
|
||||
"read:admin:ad": string;
|
||||
"write:invite-codes": string;
|
||||
"read:invite-codes": string;
|
||||
"write:clip-favorite": string;
|
||||
"read:clip-favorite": string;
|
||||
"read:federation": string;
|
||||
"write:report-abuse": string;
|
||||
};
|
||||
"_auth": {
|
||||
"shareAccessTitle": string;
|
||||
|
|
|
@ -1971,6 +1971,55 @@ _permissions:
|
|||
"write:flash": "Playを操作する"
|
||||
"read:flash-likes": "Playのいいねを見る"
|
||||
"write:flash-likes": "Playのいいねを操作する"
|
||||
"read:admin:abuse-user-reports": "ユーザーからの通報を見る"
|
||||
"write:admin:delete-account": "ユーザーアカウントを削除する"
|
||||
"write:admin:delete-all-files-of-a-user": "ユーザーのすべてのファイルを削除する"
|
||||
"read:admin:index-stats": "データベースインデックスに関する情報を見る"
|
||||
"read:admin:table-stats": "データベーステーブルに関する情報を見る"
|
||||
"read:admin:user-ips": "ユーザーのIPアドレスを見る"
|
||||
"read:admin:meta": "インスタンスのメタデータを見る"
|
||||
"write:admin:reset-password": "ユーザーのパスワードをリセットする"
|
||||
"write:admin:resolve-abuse-user-report": "ユーザーからの通報を解決する"
|
||||
"write:admin:send-email": "メールを送る"
|
||||
"read:admin:server-info": "サーバーの情報を見る"
|
||||
"read:admin:show-moderation-log": "モデレーションログを見る"
|
||||
"read:admin:show-user": "ユーザーのプライベートな情報を見る"
|
||||
"read:admin:show-users": "ユーザーのプライベートな情報を見る"
|
||||
"write:admin:suspend-user": "ユーザーを凍結する"
|
||||
"write:admin:unset-user-avatar": "ユーザーのアバターを削除する"
|
||||
"write:admin:unset-user-banner": "ユーザーのバーナーを削除する"
|
||||
"write:admin:unsuspend-user": "ユーザーの凍結を解除する"
|
||||
"write:admin:meta": "インスタンスのメタデータを操作する"
|
||||
"write:admin:user-note": "モデレーションノートを操作する"
|
||||
"write:admin:roles": "ロールを操作する"
|
||||
"read:admin:roles": "ロールを見る"
|
||||
"write:admin:relays": "リレーを操作する"
|
||||
"read:admin:relays": "リレーを見る"
|
||||
"write:admin:invite-codes": "招待コードを操作する"
|
||||
"read:admin:invite-codes": "招待コードを見る"
|
||||
"write:admin:announcements": "お知らせを操作する"
|
||||
"read:admin:announcements": "お知らせを見る"
|
||||
"write:admin:avatar-decorations": "アバターデコレーションを操作する"
|
||||
"read:admin:avatar-decorations": "アバターデコレーションを見る"
|
||||
"write:admin:federation": "連合に関する情報を操作する"
|
||||
"write:admin:account": "ユーザーアカウントを操作する"
|
||||
"read:admin:account": "ユーザーに関する情報を見る"
|
||||
"write:admin:emoji": "絵文字を操作する"
|
||||
"read:admin:emoji": "絵文字を見る"
|
||||
"write:admin:queue": "ジョブキューを操作する"
|
||||
"read:admin:queue": "ジョブキューに関する情報を見る"
|
||||
"write:admin:promo": "プロモーションノートを操作する"
|
||||
"write:admin:drive": "ユーザーのドライブを操作する"
|
||||
"read:admin:drive": "ユーザーのドライブの関する情報を見る"
|
||||
"read:admin:stream": "管理者用のWebsocket APIを使う"
|
||||
"write:admin:ad": "広告を操作する"
|
||||
"read:admin:ad": "広告を見る"
|
||||
"write:invite-codes": "招待コードを作成する"
|
||||
"read:invite-codes": "招待コードを取得する"
|
||||
"write:clip-favorite": "クリップのいいねを操作する"
|
||||
"read:clip-favorite": "クリップのいいねを見る"
|
||||
"read:federation": "連合に関する情報を取得する"
|
||||
"write:report-abuse": "違反を報告する"
|
||||
|
||||
_auth:
|
||||
shareAccessTitle: "アプリへのアクセス許可"
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export const kinds = [
|
||||
'read:account',
|
||||
'write:account',
|
||||
'read:blocks',
|
||||
'write:blocks',
|
||||
'read:drive',
|
||||
'write:drive',
|
||||
'read:favorites',
|
||||
'write:favorites',
|
||||
'read:following',
|
||||
'write:following',
|
||||
'read:messaging',
|
||||
'write:messaging',
|
||||
'read:mutes',
|
||||
'write:mutes',
|
||||
'write:notes',
|
||||
'read:notifications',
|
||||
'write:notifications',
|
||||
'read:reactions',
|
||||
'write:reactions',
|
||||
'write:votes',
|
||||
'read:pages',
|
||||
'write:pages',
|
||||
'write:page-likes',
|
||||
'read:page-likes',
|
||||
'read:user-groups',
|
||||
'write:user-groups',
|
||||
'read:channels',
|
||||
'write:channels',
|
||||
'read:gallery',
|
||||
'write:gallery',
|
||||
'read:gallery-likes',
|
||||
'write:gallery-likes',
|
||||
];
|
||||
// IF YOU ADD KINDS(PERMISSIONS), YOU MUST ADD TRANSLATIONS (under _permissions).
|
|
@ -330,7 +330,8 @@ export class ApiCallService implements OnApplicationShutdown {
|
|||
}
|
||||
}
|
||||
|
||||
if (token && ep.meta.kind && !token.permission.some(p => p === ep.meta.kind)) {
|
||||
if (token && ((ep.meta.kind && !token.permission.some(p => p === ep.meta.kind))
|
||||
|| (!ep.meta.kind && (ep.meta.requireCredential || ep.meta.requireModerator || ep.meta.requireAdmin)))) {
|
||||
throw new ApiError({
|
||||
message: 'Your app does not have the necessary permissions to use this endpoint.',
|
||||
code: 'PERMISSION_DENIED',
|
||||
|
|
|
@ -71,6 +71,10 @@ export class StreamingApiServerService {
|
|||
|
||||
try {
|
||||
[user, app] = await this.authenticateService.authenticate(token);
|
||||
|
||||
if (app !== null && !app.permission.some(p => p === 'read:account')) {
|
||||
throw new AuthenticationError('Your app does not have necessary permissions to use websocket API.');
|
||||
}
|
||||
} catch (e) {
|
||||
if (e instanceof AuthenticationError) {
|
||||
socket.write([
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
|
||||
import type { Schema } from '@/misc/json-schema.js';
|
||||
import { permissions } from 'misskey-js';
|
||||
import { RolePolicies } from '@/core/RoleService.js';
|
||||
|
||||
import * as ep___admin_meta from './endpoints/admin/meta.js';
|
||||
|
@ -724,7 +725,7 @@ const eps = [
|
|||
['retention', ep___retention],
|
||||
];
|
||||
|
||||
export interface IEndpointMeta {
|
||||
interface IEndpointMetaBase {
|
||||
readonly stability?: 'deprecated' | 'experimental' | 'stable';
|
||||
|
||||
readonly tags?: ReadonlyArray<string>;
|
||||
|
@ -823,6 +824,23 @@ export interface IEndpointMeta {
|
|||
readonly cacheSec?: number;
|
||||
}
|
||||
|
||||
export type IEndpointMeta = (Omit<IEndpointMetaBase, 'requireCrential' | 'requireModerator' | 'requireAdmin'> & {
|
||||
requireCredential?: false,
|
||||
requireAdmin?: false,
|
||||
requireModerator?: false,
|
||||
}) | (Omit<IEndpointMetaBase, 'secure'> & {
|
||||
secure: true,
|
||||
}) | (Omit<IEndpointMetaBase, 'requireCredential' | 'kind'> & {
|
||||
requireCredential: true,
|
||||
kind: (typeof permissions)[number],
|
||||
}) | (Omit<IEndpointMetaBase, 'requireModerator' | 'kind'> & {
|
||||
requireModerator: true,
|
||||
kind: (typeof permissions)[number],
|
||||
}) | (Omit<IEndpointMetaBase, 'requireAdmin' | 'kind'> & {
|
||||
requireAdmin: true,
|
||||
kind: (typeof permissions)[number],
|
||||
})
|
||||
|
||||
export interface IEndpoint {
|
||||
name: string;
|
||||
meta: IEndpointMeta;
|
||||
|
|
|
@ -13,10 +13,9 @@ import { AbuseUserReportEntityService } from '@/core/entities/AbuseUserReportEnt
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:abuse-user-reports',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
|
|
|
@ -15,7 +15,7 @@ import { DI } from '@/di-symbols.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
secure: true,
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
|
|
|
@ -14,10 +14,9 @@ import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'write:admin:account',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -13,10 +13,9 @@ import { ApiError } from '@/server/api/error.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'read:admin:account',
|
||||
|
||||
errors: {
|
||||
userNotFound: {
|
||||
|
|
|
@ -13,10 +13,9 @@ import { ModerationLogService } from '@/core/ModerationLogService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:ad',
|
||||
res: {
|
||||
type: 'object',
|
||||
optional: false,
|
||||
|
|
|
@ -13,10 +13,9 @@ import { ApiError } from '../../../error.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:ad',
|
||||
|
||||
errors: {
|
||||
noSuchAd: {
|
||||
|
|
|
@ -12,10 +12,9 @@ import { DI } from '@/di-symbols.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:ad',
|
||||
res: {
|
||||
type: 'array',
|
||||
optional: false,
|
||||
|
|
|
@ -13,10 +13,9 @@ import { ApiError } from '../../../error.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:ad',
|
||||
|
||||
errors: {
|
||||
noSuchAd: {
|
||||
|
|
|
@ -10,10 +10,9 @@ import { AnnouncementService } from '@/core/AnnouncementService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:announcements',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
|
|
|
@ -13,10 +13,9 @@ import { ApiError } from '../../../error.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:announcements',
|
||||
|
||||
errors: {
|
||||
noSuchAnnouncement: {
|
||||
|
|
|
@ -14,10 +14,9 @@ import { IdService } from '@/core/IdService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:announcements',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
|
|
|
@ -13,10 +13,9 @@ import { ApiError } from '../../../error.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:announcements',
|
||||
|
||||
errors: {
|
||||
noSuchAnnouncement: {
|
||||
|
|
|
@ -10,10 +10,9 @@ import { AvatarDecorationService } from '@/core/AvatarDecorationService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageAvatarDecorations',
|
||||
kind: 'write:admin:avatar-decorations',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -12,10 +12,9 @@ import { ApiError } from '../../../error.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageAvatarDecorations',
|
||||
kind: 'write:admin:avatar-decorations',
|
||||
errors: {
|
||||
},
|
||||
} as const;
|
||||
|
|
|
@ -15,10 +15,9 @@ import { AvatarDecorationService } from '@/core/AvatarDecorationService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageAvatarDecorations',
|
||||
kind: 'read:admin:avatar-decorations',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
|
|
|
@ -12,10 +12,9 @@ import { ApiError } from '../../../error.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageAvatarDecorations',
|
||||
kind: 'write:admin:avatar-decorations',
|
||||
|
||||
errors: {
|
||||
},
|
||||
|
|
|
@ -12,10 +12,9 @@ import { DI } from '@/di-symbols.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'write:admin:delete-account',
|
||||
|
||||
res: {
|
||||
},
|
||||
|
|
|
@ -12,10 +12,9 @@ import { DI } from '@/di-symbols.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'write:admin:delete-all-files-of-a-user',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -10,10 +10,9 @@ import { QueueService } from '@/core/QueueService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:drive',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -13,10 +13,9 @@ import { DI } from '@/di-symbols.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:drive',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -13,10 +13,9 @@ import { DriveFileEntityService } from '@/core/entities/DriveFileEntityService.j
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:drive',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
|
|
|
@ -14,10 +14,9 @@ import { ApiError } from '../../../error.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:drive',
|
||||
|
||||
errors: {
|
||||
noSuchFile: {
|
||||
|
|
|
@ -10,10 +10,9 @@ import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -14,10 +14,9 @@ import { ApiError } from '../../../error.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
|
||||
errors: {
|
||||
noSuchFile: {
|
||||
|
|
|
@ -16,10 +16,9 @@ import { ApiError } from '../../../error.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
|
||||
errors: {
|
||||
noSuchEmoji: {
|
||||
|
|
|
@ -10,10 +10,9 @@ import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -10,10 +10,9 @@ import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
|
||||
errors: {
|
||||
noSuchEmoji: {
|
||||
|
|
|
@ -8,7 +8,7 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
|
|||
import { QueueService } from '@/core/QueueService.js';
|
||||
|
||||
export const meta = {
|
||||
kind: 'write:admin',
|
||||
secure: true,
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
} as const;
|
||||
|
|
|
@ -15,10 +15,9 @@ import { sqlLikeEscape } from '@/misc/sql-like-escape.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'read:admin:emoji',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
|
|
|
@ -15,10 +15,9 @@ import { EmojiEntityService } from '@/core/entities/EmojiEntityService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'read:admin:emoji',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
|
|
|
@ -10,10 +10,9 @@ import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -10,10 +10,9 @@ import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -10,10 +10,9 @@ import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -10,10 +10,9 @@ import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -13,10 +13,9 @@ import { ApiError } from '../../../error.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'write:admin:emoji',
|
||||
|
||||
errors: {
|
||||
noSuchEmoji: {
|
||||
|
|
|
@ -12,10 +12,9 @@ import { DI } from '@/di-symbols.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:federation',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -13,10 +13,9 @@ import { DI } from '@/di-symbols.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:federation',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -12,10 +12,9 @@ import { QueueService } from '@/core/QueueService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:federation',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -14,10 +14,9 @@ import { ModerationLogService } from '@/core/ModerationLogService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:federation',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -11,8 +11,7 @@ import { DI } from '@/di-symbols.js';
|
|||
export const meta = {
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
|
||||
kind: 'read:admin',
|
||||
kind: 'read:admin:index-stats',
|
||||
|
||||
tags: ['admin'],
|
||||
res: {
|
||||
|
|
|
@ -11,8 +11,7 @@ import { DI } from '@/di-symbols.js';
|
|||
export const meta = {
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
|
||||
kind: 'read:admin',
|
||||
kind: 'read:admin:table-stats',
|
||||
|
||||
tags: ['admin'],
|
||||
|
||||
|
|
|
@ -12,10 +12,9 @@ import { IdService } from '@/core/IdService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:user-ips',
|
||||
res: {
|
||||
type: 'array',
|
||||
optional: false,
|
||||
|
@ -34,7 +33,7 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -16,10 +16,9 @@ import { ApiError } from '../../../error.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:invite-codes',
|
||||
|
||||
errors: {
|
||||
invalidDateTime: {
|
||||
|
|
|
@ -12,10 +12,9 @@ import { DI } from '@/di-symbols.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:invite-codes',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
|
|
|
@ -13,10 +13,9 @@ import { DEFAULT_POLICIES } from '@/core/RoleService.js';
|
|||
export const meta = {
|
||||
tags: ['meta'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'read:admin:meta',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
|
|
|
@ -13,10 +13,9 @@ import { ApiError } from '../../../error.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:promo',
|
||||
|
||||
errors: {
|
||||
noSuchNote: {
|
||||
|
|
|
@ -11,10 +11,9 @@ import { QueueService } from '@/core/QueueService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:queue',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -11,10 +11,9 @@ import type { DeliverQueue } from '@/core/QueueModule.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:queue',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
|
|
|
@ -11,10 +11,9 @@ import type { InboxQueue } from '@/core/QueueModule.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:queue',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
|
|
|
@ -11,10 +11,9 @@ import { QueueService } from '@/core/QueueService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:queue',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -10,10 +10,9 @@ import type { DbQueue, DeliverQueue, EndedPollNotificationQueue, InboxQueue, Obj
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:emoji',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
|
|
|
@ -12,10 +12,9 @@ import { ApiError } from '../../../error.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:relays',
|
||||
|
||||
errors: {
|
||||
invalidUrl: {
|
||||
|
|
|
@ -10,10 +10,9 @@ import { RelayService } from '@/core/RelayService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:relays',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
|
|
|
@ -10,10 +10,9 @@ import { RelayService } from '@/core/RelayService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:relays',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -14,10 +14,9 @@ import { ModerationLogService } from '@/core/ModerationLogService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:reset-password',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
|
|
|
@ -15,10 +15,9 @@ import { ModerationLogService } from '@/core/ModerationLogService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:resolve-abuse-user-report',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -13,10 +13,9 @@ import { RoleService } from '@/core/RoleService.js';
|
|||
export const meta = {
|
||||
tags: ['admin', 'role'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:roles',
|
||||
|
||||
errors: {
|
||||
noSuchRole: {
|
||||
|
|
|
@ -11,10 +11,9 @@ import { RoleService } from '@/core/RoleService.js';
|
|||
export const meta = {
|
||||
tags: ['admin', 'role'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'write:admin:roles',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
|
|
|
@ -13,10 +13,9 @@ import { RoleService } from '@/core/RoleService.js';
|
|||
export const meta = {
|
||||
tags: ['admin', 'role'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'write:admin:roles',
|
||||
|
||||
errors: {
|
||||
noSuchRole: {
|
||||
|
|
|
@ -12,10 +12,9 @@ import { RoleEntityService } from '@/core/entities/RoleEntityService.js';
|
|||
export const meta = {
|
||||
tags: ['admin', 'role'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:roles',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
|
|
|
@ -13,10 +13,9 @@ import { RoleEntityService } from '@/core/entities/RoleEntityService.js';
|
|||
export const meta = {
|
||||
tags: ['admin', 'role'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:roles',
|
||||
|
||||
errors: {
|
||||
noSuchRole: {
|
||||
|
|
|
@ -13,10 +13,9 @@ import { RoleService } from '@/core/RoleService.js';
|
|||
export const meta = {
|
||||
tags: ['admin', 'role'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:roles',
|
||||
|
||||
errors: {
|
||||
noSuchRole: {
|
||||
|
|
|
@ -11,10 +11,9 @@ import { MetaService } from '@/core/MetaService.js';
|
|||
export const meta = {
|
||||
tags: ['admin', 'role'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'write:admin:roles',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -14,10 +14,9 @@ import { RoleService } from '@/core/RoleService.js';
|
|||
export const meta = {
|
||||
tags: ['admin', 'role'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'write:admin:roles',
|
||||
|
||||
errors: {
|
||||
noSuchRole: {
|
||||
|
|
|
@ -16,10 +16,9 @@ import { ApiError } from '../../../error.js';
|
|||
export const meta = {
|
||||
tags: ['admin', 'role', 'users'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
requireCredential: false,
|
||||
requireAdmin: true,
|
||||
kind: 'read:admin:roles',
|
||||
|
||||
errors: {
|
||||
noSuchRole: {
|
||||
|
|
|
@ -10,10 +10,9 @@ import { EmailService } from '@/core/EmailService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:send-email',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -14,11 +14,10 @@ import { DI } from '@/di-symbols.js';
|
|||
export const meta = {
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:server-info',
|
||||
|
||||
tags: ['admin', 'meta'],
|
||||
|
||||
kind: 'read:admin',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
|
|
|
@ -15,8 +15,7 @@ export const meta = {
|
|||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
|
||||
kind: 'read:admin',
|
||||
kind: 'read:admin:show-moderation-log',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
|
|
|
@ -16,8 +16,7 @@ export const meta = {
|
|||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
|
||||
kind: 'read:admin',
|
||||
kind: 'read:admin:show-user',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
|
|
|
@ -16,8 +16,7 @@ export const meta = {
|
|||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
|
||||
kind: 'read:admin',
|
||||
kind: 'read:admin:show-users',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
|
|
|
@ -19,10 +19,9 @@ import { QueueService } from '@/core/QueueService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:suspend-user',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -12,10 +12,9 @@ import { ModerationLogService } from '@/core/ModerationLogService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:unset-user-avatar',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -12,10 +12,9 @@ import { ModerationLogService } from '@/core/ModerationLogService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:unset-user-banner',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -13,10 +13,9 @@ import { DI } from '@/di-symbols.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:unsuspend-user',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -12,10 +12,9 @@ import { MetaService } from '@/core/MetaService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
kind: 'write:admin:meta',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -12,10 +12,9 @@ import { ModerationLogService } from '@/core/ModerationLogService.js';
|
|||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
kind: 'write:admin',
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'write:admin:user-note',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -12,6 +12,7 @@ export const meta = {
|
|||
tags: ['federation'],
|
||||
|
||||
requireCredential: true,
|
||||
kind: 'read:federation',
|
||||
|
||||
limit: {
|
||||
duration: ms('1hour'),
|
||||
|
|
|
@ -25,6 +25,7 @@ export const meta = {
|
|||
tags: ['federation'],
|
||||
|
||||
requireCredential: true,
|
||||
kind: 'read:account',
|
||||
|
||||
limit: {
|
||||
duration: ms('1hour'),
|
||||
|
|
|
@ -11,7 +11,7 @@ import { GetterService } from '@/server/api/GetterService.js';
|
|||
export const meta = {
|
||||
tags: ['federation'],
|
||||
|
||||
requireCredential: true,
|
||||
requireCredential: false,
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -14,6 +14,7 @@ export const meta = {
|
|||
tags: ['meta'],
|
||||
|
||||
requireCredential: true,
|
||||
secure: true,
|
||||
|
||||
limit: {
|
||||
duration: ms('1hour'),
|
||||
|
|
|
@ -14,6 +14,7 @@ export const meta = {
|
|||
tags: ['account'],
|
||||
|
||||
requireCredential: true,
|
||||
kind: "read:account",
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
|
|
|
@ -10,6 +10,7 @@ import { AchievementService, ACHIEVEMENT_TYPES } from '@/core/AchievementService
|
|||
export const meta = {
|
||||
requireCredential: true,
|
||||
prohibitMoved: true,
|
||||
kind: 'write:account',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -9,6 +9,7 @@ import { RegistryApiService } from '@/core/RegistryApiService.js';
|
|||
|
||||
export const meta = {
|
||||
requireCredential: true,
|
||||
kind: 'read:account',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
|
|
|
@ -10,6 +10,7 @@ import { ApiError } from '../../../error.js';
|
|||
|
||||
export const meta = {
|
||||
requireCredential: true,
|
||||
kind: 'read:account',
|
||||
|
||||
errors: {
|
||||
noSuchKey: {
|
||||
|
|
|
@ -10,6 +10,7 @@ import { ApiError } from '../../../error.js';
|
|||
|
||||
export const meta = {
|
||||
requireCredential: true,
|
||||
kind: 'read:account',
|
||||
|
||||
errors: {
|
||||
noSuchKey: {
|
||||
|
|
|
@ -9,6 +9,7 @@ import { RegistryApiService } from '@/core/RegistryApiService.js';
|
|||
|
||||
export const meta = {
|
||||
requireCredential: true,
|
||||
kind: 'read:account',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
|
|
|
@ -9,6 +9,7 @@ import { RegistryApiService } from '@/core/RegistryApiService.js';
|
|||
|
||||
export const meta = {
|
||||
requireCredential: true,
|
||||
kind: 'read:account',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -12,6 +12,7 @@ import { ApiError } from '../../../error.js';
|
|||
|
||||
export const meta = {
|
||||
requireCredential: true,
|
||||
kind: 'write:account',
|
||||
|
||||
errors: {
|
||||
noSuchKey: {
|
||||
|
|
|
@ -9,6 +9,7 @@ import { RegistryApiService } from '@/core/RegistryApiService.js';
|
|||
|
||||
export const meta = {
|
||||
requireCredential: true,
|
||||
kind: 'write:account',
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
@ -19,6 +19,7 @@ export const meta = {
|
|||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canInvite',
|
||||
kind: 'write:invite-codes',
|
||||
|
||||
errors: {
|
||||
exceededCreateLimit: {
|
||||
|
|
|
@ -15,6 +15,7 @@ export const meta = {
|
|||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canInvite',
|
||||
kind: 'write:invite-codes',
|
||||
|
||||
errors: {
|
||||
noSuchCode: {
|
||||
|
|
|
@ -16,6 +16,7 @@ export const meta = {
|
|||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canInvite',
|
||||
kind: 'read:invite-codes',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
|
|
|
@ -15,6 +15,7 @@ export const meta = {
|
|||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canInvite',
|
||||
kind: 'read:invite-codes',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue