When I attempt to limit by role, I can't limit authenticated users.

Comments

DuaelFr’s picture

Status: Active » Needs work

Authenticated users is a virtual role.
In the 6.x branch this was not possible too.

When I will have end basic D7 port I will try to find a way to do this.

NathanM’s picture

subscribing

mrtoner’s picture

So that I understand the issue before upgrading to D7, the problem is simply that an authenticated user with no additional roles assigned cannot have a limit set? And if I assign an additional role to each authenticated user Node Limits will work?

infines’s picture

Correct.

mrtoner’s picture

Thank you!

kimadactyl’s picture

Hmm - I've done this using Rules, and I'm still getting the "Cannot create content" error.

kimadactyl’s picture

Whoops - never mind, I didn't have role node limits enabled!

So, as a temporary fix:

1. Install Rules module
2. Create a new rule, triggered "after saving a new user account"
3. In Actions add your new role to the user

Works a treat!

Liliplanet’s picture

hmm that's kind of deal breaker as authenticated role is the system role in Drupal.

Is it perhaps possible to 'negate' role selection, so 'if user is not custom role'? which will then default to authenticated ..

Most appreciate any reply and thank you :)

DuaelFr’s picture

The fact is that "Authenticated user" role is virtual.
When a new user is created, this role is not affected to him in the database. So, this module have to handle anonymous and authenticated users as exceptions and not as the common case.

I will try to work on node_limit today. This would not be so hard to code.

Liliplanet’s picture

Thank you so much DuaelFR!

DuaelFr’s picture

Once again I did not find the time :/
Maybe on today or monday. Keep hope ;)

mrtoner’s picture

Priority: Critical » Major
Status: Needs work » Active

@Liliplanet: There are several modules that allow you to automatically set a role for a new user. This current limitation of Node Limit need not be a deal-breaker unless you want it to be.

Resetting priority to major, since the project is not unusable with this workaround. Resetting status to active, since no patch has been submitted.

Liliplanet’s picture

thank you mrtoner for re-opening this issue, yes have been waiting patiently, would love the ability to add nodes as an authenticated + specific defined role :)

DuaelFr’s picture

Assigned: Unassigned » DuaelFr
Status: Active » Needs review
infines’s picture

Status: Needs review » Reviewed & tested by the community
DuaelFr’s picture

Status: Reviewed & tested by the community » Closed (fixed)