Organization role customization

Goal: Have only custom roles and access control for organizations
Observed Behavior: Things still being created as "owner", I think "admin", "owner" and other roles still exist. I only want my custom roles, and I want the creating user to get the custom role as well ("parent" in this case).

Background:
I'm building a family management app, using an organization as the "family", and I want to have custom roles for parents and children, etc. I have followed the custom roles/authorization docs for the organization to customize things. Here is what that looks like so far:
const statement = {
    organization: ["update"],
    invitation: ["create", "cancel"],
} as const;

const ac = createAccessControl(statement);

const parent = ac.newRole({
    organization: ["update"],
    invitation: ["create", "cancel"],
});

and I've included the "ac" and "parent" on both server and client side plugins. (client shown below)
        organizationClient({
            ac,
            roles: {
                parent,
            },
        }),

Is what I'm trying to do possible, or are owner, admin, and member always roles, and I can only extend things?
Was this page helpful?