0

On a site where only authenticated users have the permision to access content, I want to set up one test user that can log in but not access any content.

How would I achieve this?

This user will only be used to test different authentication methods. After logging in the user shoud get a "acces denied" result for all content.

0

I would say to create a role that has access to content, grant that to the existing users, then uncheck "access content" from the 'Authenticated' role. This will also allow the system to know that even if a user is logged in, this does not grant them special privilege until they have an elevated role assigned to them.

The authenticated role should be just a starting point for a user that logs in. I never leverage it for granting permissions in a way that would make it a 'unique' role - just make that role. Otherwise you are going to have to jump through hoops with code which can be easily avoided by creating a few roles.

You can assign a user multiple roles. During authentication, I take it you can figure out how or what role to assign to them. Every authenticated user will get the 'authenticated' role by default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.