Refuse a group change that would lock the acting admin out, and title a read-only user page View user
CI / full-gate (push) Successful in 3m22s
CI / full-gate (push) Successful in 3m22s
This commit is contained in:
@@ -100,6 +100,12 @@ test("buildUserFormModel: edit mode prefills, locks email, and exposes state/del
|
||||
assert.equal(buildUserFormModel({ identity: identity(4, { state: "inactive" }) }).edit!.nextLabel, "Reactivate");
|
||||
});
|
||||
|
||||
test("buildUserFormModel: a users:read holder sees the page titled View user, with a View breadcrumb", () => {
|
||||
const m = buildUserFormModel({ canWrite: false, identity: identity(3) });
|
||||
assert.equal(m.title, "View user");
|
||||
assert.deepEqual(m.breadcrumbs.at(-1), { label: "View" });
|
||||
});
|
||||
|
||||
test("createIdentityPayload: schema/state/traits, name only when given, password only when set", () => {
|
||||
assert.deepEqual(createIdentityPayload({ email: "a@b.c", first: "Ada", last: "Lovelace", password: "" }), {
|
||||
schema_id: "default",
|
||||
|
||||
Reference in New Issue
Block a user