mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
Allow mods to migrate users Closes #1825
This commit is contained in:
parent
d0832d12f0
commit
098ff1749a
|
|
@ -22,7 +22,7 @@ export const action = async ({ request }: ActionFunctionArgs) => {
|
|||
|
||||
switch (data._action) {
|
||||
case "MIGRATE": {
|
||||
validate(isAdmin(user), "Admin needed", 401);
|
||||
validate(isMod(user), "Admin needed", 401);
|
||||
|
||||
await AdminRepository.migrate({
|
||||
oldUserId: data["old-user"],
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ export default function AdminPage() {
|
|||
{process.env.NODE_ENV !== "production" || isAdmin(user) ? (
|
||||
<Impersonate />
|
||||
) : null}
|
||||
{isAdmin(user) ? <MigrateUser /> : null}
|
||||
{isMod(user) ? <MigrateUser /> : null}
|
||||
{isAdmin(user) ? <ForcePatron /> : null}
|
||||
{isMod(user) ? <BanUser /> : null}
|
||||
{isMod(user) ? <UnbanUser /> : null}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user