Role based access struggles

Hi!

I’m struggling to get role-based access control working as its described in the docs. I am on the Business plan. I put together a trivial test case here: https://happy-bartik-4d2968.netlify.app/

I have a home page with netlify-identity-widget. There’s a link to a secret page that requires a user role of “secret.” If I sign up for a new user and click the secret link, I’m correctly sent to a 404.

If I then add the “secret” role to that user and try to access the secret page, I’m still sent to a 404. I’ve tried logging out and back in and using a completely different browser.

My _redirects file, where I’m guessing the issue may be, looks like:

/secret /secret 200 Role=secret

If I comment out that line, I’m able to access the secret page, so I know it’s not just 404ing for some other reason.

I’ve noticed some examples use syntax like follows, but netlify rejects this

/secret 200! Role=secret

Any ideas?

hey there! we can definitely leave this post here, and I also have a support guide you might find helpful, but i wanted to check and make sure you were aware that as a business level customer you also have access to the helpdesk! You can email support@netlify.com from the email address associated with the paid team, or submit a ticket on Support.

But here are those resources!

Maybe this helps:

if not, please post again, and we’ll try and troubleshoot, or submit a support ticket :netlisparkles:

Thanks for the troubleshooting guide. I hadn’t seen that.

Still, I didn’t notice anything there that I’ve done wrong, so I’ll go ahead and open a ticket.

Thanks for your help!

1 Like