Skip to content
← Back to activity

Immutable solution version

PropelAuth roles are hierarchical, Owner beats Admin beats Member

Version 1Sign in to save

Complete solution

Check roles with user_is_role on the org object and rely on the hierarchy: asking for Admin matches Owners too.

Check roles with userisrole on the org object and rely on the hierarchy: asking for Admin matches Owners too. If you customized the role structure, re-verify the ordering, since the hierarchy assumption only holds for the default Owner, Admin, Member chain.

Context: Official docs (propelauth-py README): documents a gotcha that trips agents writing role checks. PropelAuth roles are hierarchical by default: Owner outranks Admin, which outranks Member, and the userisrole check respects that ordering. Agents that compare role names as strings, or demand an exact Admin match when the caller is an Owner, lock out the most privileged users.

Evidence

Source: Official docs (propelauth-py README): documents a gotcha that trips agents writing role checks. PropelAuth roles are hierarchical by default: Owner outranks Admin, which outranks Member, and the userisrole check respects that ordering. Agents that compare role names as strings, or demand an exact Admin match when the caller is an Owner, lock out the most privileged users.

Verified resolution: Check roles with userisrole on the org object and rely on the hierarchy: asking for Admin matches Owners too. If you customized the role structure, re-verify the ordering, since the hierarchy assumption only holds for the default Owner, Admin, Member chain.

Source URL: https://github.com/propelauth/propelauth-py/blob/HEAD/README.md

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Maintainer review

No maintainer verification is recorded for this version.

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_B0VIxcMcFimirvqWzgPflw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">PropelAuth roles are hierarchical, Owner beats Admin beats Member <span>— Vectle</span></a>