Skip to content

Commit

Permalink
연합된 인스턴스 정보를 모더레이터 권한이 있어야 읽을 수 있도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
yunochi committed Aug 31, 2024
1 parent c9ca0a6 commit 3841016
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 16 deletions.
1 change: 1 addition & 0 deletions locales/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2090,6 +2090,7 @@ _permissions:
"write:admin:avatar-decorations": "Can manage avatar decorations"
"read:admin:avatar-decorations": "View avatar decorations"
"write:admin:federation": "Manage federation data"
"read:admin:federation": "Read federation data"
"write:admin:account": "Manage user account"
"read:admin:account": "View user account"
"write:admin:emoji": "Manage emoji"
Expand Down
1 change: 1 addition & 0 deletions locales/ko-KR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2075,6 +2075,7 @@ _permissions:
"write:admin:avatar-decorations": "아바타 꾸미기 수정하기"
"read:admin:avatar-decorations": "아바타 꾸미기 보기"
"write:admin:federation": "연합 정보 수정하기"
"read:admin:federation": "연합 정보 읽기"
"write:admin:account": "사용자 계정 수정하기"
"read:admin:account": "사용자 정보 보기"
"write:admin:emoji": "이모지 수정하기"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import { sqlLikeEscape } from '@/misc/sql-like-escape.js';
export const meta = {
tags: ['federation'],

requireCredential: false,
requireCredential: true,
requireModerator: true,
kind: 'read:admin:federation',

allowGet: true,
cacheSec: 3600,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import { DI } from '@/di-symbols.js';
export const meta = {
tags: ['federation'],

requireCredential: false,
requireCredential: true,
requireModerator: true,
kind: 'read:admin:federation',

res: {
type: 'object',
Expand Down
2 changes: 1 addition & 1 deletion packages/misskey-js/etc/misskey-js.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2769,7 +2769,7 @@ type PartialRolePolicyOverride = Partial<{
}>;

// @public (undocumented)
export const permissions: readonly ["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", "read:flash", "write:flash", "read:flash-likes", "write:flash-likes", "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", "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", "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", "write:admin:ad", "read:admin:ad", "write:invite-codes", "read:invite-codes", "write:clip-favorite", "read:clip-favorite", "read:federation", "write:report-abuse"];
export const permissions: readonly ["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", "read:flash", "write:flash", "read:flash-likes", "write:flash-likes", "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", "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", "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", "read: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", "write:admin:ad", "read:admin:ad", "write:invite-codes", "read:invite-codes", "write:clip-favorite", "read:clip-favorite", "read:federation", "write:report-abuse"];

// @public (undocumented)
type PingResponse = operations['ping']['responses']['200']['content']['application/json'];
Expand Down
7 changes: 3 additions & 4 deletions packages/misskey-js/src/autogen/apiClientJSDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1834,7 +1834,7 @@ declare module '../api.js' {
/**
* No description provided.
*
* **Credential required**: *No*
* **Credential required**: *Yes* / **Permission**: *read:admin:federation*
*/
request<E extends 'federation/instances', P extends Endpoints[E]['req']>(
endpoint: E,
Expand All @@ -1845,7 +1845,7 @@ declare module '../api.js' {
/**
* No description provided.
*
* **Credential required**: *No*
* **Credential required**: *Yes* / **Permission**: *read:admin:federation*
*/
request<E extends 'federation/show-instance', P extends Endpoints[E]['req']>(
endpoint: E,
Expand Down Expand Up @@ -2697,8 +2697,7 @@ declare module '../api.js' {
/**
* No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes*
* **Credential required**: *Yes* / **Permission**: *read:account*
*/
request<E extends 'i/revoke-token', P extends Endpoints[E]['req']>(
endpoint: E,
Expand Down
16 changes: 7 additions & 9 deletions packages/misskey-js/src/autogen/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1599,14 +1599,14 @@ export type paths = {
* federation/instances
* @description No description provided.
*
* **Credential required**: *No*
* **Credential required**: *Yes* / **Permission**: *read:admin:federation*
*/
get: operations['federation___instances'];
/**
* federation/instances
* @description No description provided.
*
* **Credential required**: *No*
* **Credential required**: *Yes* / **Permission**: *read:admin:federation*
*/
post: operations['federation___instances'];
};
Expand All @@ -1615,7 +1615,7 @@ export type paths = {
* federation/show-instance
* @description No description provided.
*
* **Credential required**: *No*
* **Credential required**: *Yes* / **Permission**: *read:admin:federation*
*/
post: operations['federation___show-instance'];
};
Expand Down Expand Up @@ -2338,8 +2338,7 @@ export type paths = {
* i/revoke-token
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes*
* **Credential required**: *Yes* / **Permission**: *read:account*
*/
post: operations['i___revoke-token'];
};
Expand Down Expand Up @@ -15017,7 +15016,7 @@ export type operations = {
* federation/instances
* @description No description provided.
*
* **Credential required**: *No*
* **Credential required**: *Yes* / **Permission**: *read:admin:federation*
*/
federation___instances: {
requestBody: {
Expand Down Expand Up @@ -15084,7 +15083,7 @@ export type operations = {
* federation/show-instance
* @description No description provided.
*
* **Credential required**: *No*
* **Credential required**: *Yes* / **Permission**: *read:admin:federation*
*/
'federation___show-instance': {
requestBody: {
Expand Down Expand Up @@ -19333,8 +19332,7 @@ export type operations = {
* i/revoke-token
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes*
* **Credential required**: *Yes* / **Permission**: *read:account*
*/
'i___revoke-token': {
requestBody: {
Expand Down
1 change: 1 addition & 0 deletions packages/misskey-js/src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export const permissions = [
'write:admin:avatar-decorations',
'read:admin:avatar-decorations',
'write:admin:federation',
'read:admin:federation',
'write:admin:account',
'read:admin:account',
'write:admin:emoji',
Expand Down

0 comments on commit 3841016

Please sign in to comment.