server: system accounts cannot be registered
All checks were successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
All checks were successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
While refactoring the previous commit, it seemed like the previous authors expected that a system account could be registered somehow and that this would be an error condition. However, as now made explicit with this, it is not possible to register a system account. This means that any account by that name could only ever have been created by the system itself so fetching them should be fine and not an error condition.
This commit is contained in:
parent
688deda218
commit
9b8438cdfc
1 changed files with 2 additions and 0 deletions
|
@ -26,6 +26,8 @@ type IsMeAndIsUserDetailed<ExpectsMe extends boolean | null, Detailed extends bo
|
||||||
|
|
||||||
const ajv = new Ajv();
|
const ajv = new Ajv();
|
||||||
|
|
||||||
|
// It is important that localUsernameSchema does not allow any usernames
|
||||||
|
// containing dots because those are used for system actors.
|
||||||
const localUsernameSchema = { type: 'string', pattern: /^\w{1,20}$/.toString().slice(1, -1) } as const;
|
const localUsernameSchema = { type: 'string', pattern: /^\w{1,20}$/.toString().slice(1, -1) } as const;
|
||||||
const passwordSchema = { type: 'string', minLength: 1 } as const;
|
const passwordSchema = { type: 'string', minLength: 1 } as const;
|
||||||
const nameSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;
|
const nameSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;
|
||||||
|
|
Loading…
Reference in a new issue