mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-22 14:05:12 +00:00
admin/accounts/createで一般ユーザーがアカウントを作成し放題なのを修正 (#6205)
This commit is contained in:
parent
a448172952
commit
4c6d0386b9
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ export const meta = {
|
|||
|
||||
export default define(meta, async (ps, me) => {
|
||||
const noUsers = (await Users.count({})) === 0;
|
||||
if (!noUsers && me == null) throw new Error('access denied');
|
||||
if (!noUsers && !me?.isAdmin) throw new Error('access denied');
|
||||
|
||||
const { account, secret } = await signup(ps.username, ps.password);
|
||||
|
||||
|
|
Loading…
Reference in a new issue