Move admin flag from person to local_user (fixes #3060)
The person table is for federated data, but admin flag can only apply to local users. Thats why it really belongs in the local_user table. This will also prevent the federation code from accidentally overwriting the admin flag
This is not a breaking change, the API is unchanged.
Resolved conflicts. For some reason api tests are failing with this error, no idea why:
$ jest -i follow.spec.ts && jest -i src/post.spec.ts && jest -i comment.spec.ts && jest -i private_message.spec.ts && jest -i user.spec.ts && jest -i community.spec.ts
FAIL src/follow.spec.ts
✕ Follow federated community
● Follow federated community
thrown: "unknown"
10 | } from "./shared";
11 |
> 12 | beforeAll(async () => {
| ^
13 | await setupLogins();
14 | });
15 |
at Object.<anonymous> (src/follow.spec.ts:12:1)
I'll test it out now
The admin column on the source table was in the wrong order. It needs to match the order in schema.rs. This was hard to find because they were both boolean columns.
This test started failing all the sudden.
I don't understand why its suddenly unable to resolve a banned person.