Im trying to give a different session limit to a custom role but it always defaults to the session limit on authenticated user. I was hoping to give authenticated users a few sessions but my custom role only 1 session.

I think what Im expecting is what the module is supposed to do, but its simply not working with version 2.1. Is this indeed a bug?

Comments

deekayen’s picture

Status: Active » Closed (duplicate)

You're experiencing intended behavior. See #763488: Which has priority - role or user?

RikiB’s picture

Status: Closed (duplicate) » Active

Thanks for the response. I read that carefully and see something different here. Please allow me 1 more chance to clarify the problem.

Drupal seems to automatically assign the "authenticated user" role to everyone except anonymous. I have the authenticated user role set to 5 sessions and a "custom user" role set to 1 session. The problem is it will always use the authenticated roles session count and ignore custom user role! So I am seeing a bug that forces the authenticated session number on ALL roles except anonymous.

Surely there is a way to have a custom session on a role other than authenticated and anonymous?

deekayen’s picture

Category: bug » support
Status: Active » Closed (works as designed)

I'm still pretty sure you're experiencing intended behavior. If you want your "custom user" role to have 1 session limit, then your "authenticated user" setting should be at 1. You can still set "custom user" to 1 then if you want. The users you want to have 5 sessions should be members of another role that has that limit, like a "extra sessions" role.

You seem to be under the impression in your report that custom roles can't have custom session limit settings, but the reality is that users will always be granted the maximum number of allowed sessions available to them in either the global, role, or user settings that apply to their account. Since every user is authenticated, 5 will always override 1 just because it is the most access available.

RikiB’s picture

Would it be ok to move this to an active feature request?

It doesnt seem like a good option (even if I knew how) to move and default everyone (normal authenticated users) to another role simply to allow them more than 1 session.

All I want to do is very simple, have a particular role restricted to 1 session and the other roles unlimited or at least a higher number than 1.

RikiB’s picture

Status: Closed (works as designed) » Fixed

Actually I found a solution!

If you set the default to unlimited, and only change the custom group to 1, then the authenticated will be unlimited and the custom will be 1.

Thant works for me :)

deekayen’s picture

Category: support » bug
Priority: Critical » Normal
Status: Fixed » Active

Actually, that's a bug.

RikiB’s picture

hmm, by fixing this bug you remove a valuable feature. I tested it thoroughly and it works perfectly.

johnennew’s picture

Version: 6.x-2.1 » 7.x-2.x-dev
Status: Active » Closed (fixed)

The precedence of session limits in the 7.x-2.x and 6.x-2.x branches are currently:

1. User limit, if not set or 0 then
2. highest role limit. If not set or all are set to default then,
3. system default limit

I have added this note to the README.txt files.