ยฉ 2026 Hedgehog Software, LLC
const permissionResult = await authClient.organization.hasPermission({ permission: { organization: ["update"] } })
{ data: { {error: null, success: false} }, error: null }
const updateResult = await authClient.organization.update({ data: { name: "new org name" } })
{data: null, error: null}
onSuccess
const statement = { ...defaultStatements, project: ["create", "update", "delete"], } as const; export const ac = createAccessControl(statement); export const authRoles = { estimator: ac.newRole({ ...memberAc.statements, project: ["update"], }), managingDirector: ac.newRole({ ...adminAc.statements, organization: ["update"] }) } as const;
const orgPluginConfig = organization({ allowUserToCreateOrganization: false, organizationLimit: 1, creatorRole: authRoleNames.managingDirector, ac: ac, roles: authRoles, });