Company logo
April 23, 2024

Multiple Roles & Remix

Two major updates today: the ability to add multiple roles per user, and Remix support!

Multiple Roles Per User

You can now configure your project to allow your users to have multiple roles. This can be very useful if your product has roles that don’t conform to the typical hierarchical role structure - for instance, a role that gives someone access to Billing, but nothing else.

You can learn more about multiple roles per user here.

Please note that if you enable this feature, you’ll need to update to the latest versions of our libraries.

your image alt text

Remix

We now officially integrate with Remix! One of things we love about Remix is it’s simplicity, and we’ve tried to emulate that in our integration as well.

For instance, here’s all you need to do to check a user’s role/permission within an organization:

export const loader = async ({ request, context }: LoaderFunctionArgs) => {
  const user = await auth.getUserOrRedirect(request, context);
  const org = user.getActiveOrg()
  
  // can also check org.isRole(...)
  if (org.hasPermission("analytics::view")) {
    return loadAnalytics(org.orgId)
  } else {
    return emptyAnalytics()
};

To get started with PropelAuth and Remix, check out the docs here.