Closed (fixed)
Project:
Session Limit
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2010 at 19:12 UTC
Updated:
5 Jun 2013 at 07:51 UTC
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
Comment #1
deekayen commentedYou're experiencing intended behavior. See #763488: Which has priority - role or user?
Comment #2
RikiB commentedThanks 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?
Comment #3
deekayen commentedI'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.
Comment #4
RikiB commentedWould 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.
Comment #5
RikiB commentedActually 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 :)
Comment #6
deekayen commentedActually, that's a bug.
Comment #7
RikiB commentedhmm, by fixing this bug you remove a valuable feature. I tested it thoroughly and it works perfectly.
Comment #8
johnennew commentedThe 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.