Open belatedly opened 2 years ago
You can manually mark a user as admin by issuing this SQL query:
UPDATE "user" SET "isAdmin" = TRUE WHERE "id" = '<id>';
Replace <id>
with the ID of the user (leave the single quotes). You can find the ID of a user by going to their profile page, click the three dots next to the follow button and select the "About" menu entry.
Are you absolutely sure that there is no other account? You can check by running
SELECT COUNT(1) FROM "user" WHERE "host" IS NULL;
Thank you! The instance.actor account is there in addition to the one I created but I wouldn't think it gave that one admin. I will check once the domain propagates back to the new VPS.
It might be a race condition if the instance.actor
account is created first. The auto-admin part checks the total local user count so if any of the system users gets created first, this might be an issue. https://github.com/misskey-dev/misskey/blob/1c67c26bd87aae64fe0f2ef45140e12a78564699/packages/backend/src/server/api/common/signup.ts#L88-L90
Since system accounts will always be created as a non-admin user (see below) adding isAdmin: true
as a condition to the above could resolve this problem.
https://github.com/misskey-dev/misskey/blob/1c67c26bd87aae64fe0f2ef45140e12a78564699/packages/backend/src/services/create-system-user.ts#L43
It just propagated, the instance.actor account is not set as admin either. I am guessing the lack of admin has something to do with the instance having already been established and running for nearly 2 years - even though it had propagated on my machine maybe it was still floating between the two IPs when the install was completed.
これ修正したんだっけ
same problem in v13 installed by docker
UPDATE "user" SET "isAdmin" = TRUE WHERE "id" = '
same problem in v13 installed by docker UPDATE "user" SET "isAdmin" = TRUE WHERE "id" = ''; showed : ERROR: column "isAdmin" of relation "user" does not exist
same trouble
I did some digging. The new command is:
UPDATE public.user SET "isRoot" = TRUE WHERE "id" = '<id>';
After that, reboot to let everything settle.
💡 Summary
I am moving my instance from one VPS to another on a different service. I did a fresh install on the new VPS and created the first account. It did not receive admin rights and it is the only user showing. Can someone advise how I can set the account as admin in the command line?
🥰 Expected Behavior
First account should become admin.
🤬 Actual Behavior
First account is just a regular account.
📝 Steps to Reproduce
📌 Environment
Misskey version: 12.110.1 Your OS: Debian 10 Your browser: Safari and Firefox