mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-23 14:46:07 +09:00
[backend] Require admin scope for AP get endpoint
This commit addresses disclosed primitive 18
This commit is contained in:
parent
7542310e3e
commit
aa73a8905d
@ -6,6 +6,7 @@ export const meta = {
|
||||
tags: ["federation"],
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
|
||||
limit: {
|
||||
duration: HOUR,
|
||||
|
@ -169,7 +169,7 @@
|
||||
{{ i18n.ts.updateRemoteUser }}</FormButton
|
||||
>
|
||||
|
||||
<FormFolder class="_formBlock">
|
||||
<FormFolder class="_formBlock" v-if="iAmAdmin">
|
||||
<template #label>Raw</template>
|
||||
|
||||
<MkObjectView v-if="ap" tall :value="ap">
|
||||
@ -577,13 +577,15 @@ watch(
|
||||
},
|
||||
);
|
||||
|
||||
watch($$(user), () => {
|
||||
if (iAmAdmin) {
|
||||
watch($$(user), () => {
|
||||
os.api("ap/get", {
|
||||
uri: user.uri ?? `${url}/users/${user.id}`,
|
||||
}).then((res) => {
|
||||
ap = res;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const headerActions = $computed(() => []);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user