Closed (won't fix)
Project:
Node Limit
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
29 Jun 2012 at 07:43 UTC
Updated:
16 May 2024 at 00:52 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
duaelfrUnfortunately, this is not currently possible.
The way to bypass this issue is to create a role thaht you assign to your non-admin users :
- manually if your users cannot sign in by themself
- automatically by a rule (or a dedicated module if you find one) if they can
Comment #2
Anonymous (not verified) commentedSite builders shouldn't have to change the way they setup Drupal just to accommodate a module that doesn't do something it should; I'm therefore changing this to a feature request.
I can think of two ways to do this initially:
#1 - Create a new permission 'Override node limits'. Whichever roles have this permission can create any number of nodes as if Node Limit wasn't installed (works the same as User 1).
#2 - Add a new select list to the Node Limit edit form that allows you to select roles that are excluded from the limit (i.e. apply a limit to 'authenticated', but exclude from 'administrator'). It may also be a good idea to make the Role select lists allow multiple values...
Option #1 is easiest to setup but not as configurable as option #2. Thoughts?
Comment #3
duaelfrYeah these are two great ideas.
#1 is not so hard to implement
#2 could be simply done by create a "negate" checkbox for each rule. It could not cover all use cases but it would always be better than today. The bility to choose multiple roles/content type/whatever is already in my todos.
In the future, the engine will be rewrited using Rules to become really powerfull but at this time I am too busy to manage this.
I add your suggestion in the todolist and I hope I will find a moment to improve this module before september :)
Comment #4
Anonymous (not verified) commentedHere's a patch that implements option #1.
I chose that because it was easier to do (and therefore quicker to get something working immediately), and also because you've already got plans to build a better system with Rules later on (so no point spending too much time on a temporary solution now).
Comment #5
duaelfrGood !
I will review it on monday.
Thank you
Comment #6
Lalas commentedPlease tell me how to override a users role's node creation limit for a user in that same role.
i will explain.
I have a user role "role1". And i have have three users user1, user2 and user3. The node creation limit for the role "role1" to create node of content type "type1" is set to 10. That means all these three users can create max 10 nodes of type1. I need to set the limit for the user1 as 15 so in effect user1 can create 15 nodes, user2 and user3 can create only 10 nodes.
Thank you
Comment #7
dougsap commentedHi Lalas,
Can you describe your use case a little bit more (change the industry, etc. if you are uncomfortable sharing too much info). Describe who/what type of users they are (e.g., Trusted/Internal vs people placing advertisements, etc.).
I don't maintain this project, but I know enough about it that I know:
I (or others) might have ideas when we hear more details.
Comment #8
Lalas commentedHi dougsap
there are two types of roles associated with the website - site_admin and agents. my primary concern is to control the node creation limit for the agents. By default i gave permission to create 10 node for all the users of agent role. Consider the special case if a user of role agent request for permission to create more content of the restricted type (obviously after paying). Then site_admin (who has permission to administer nodelimit) gives that specific user more node creation quota - say 50 but the default permission for all the other users of role agent remains the same (in this case 10).
What i understood that the behavior of nodelimit module, limit of role dominates the limit of individual user .i.e if agent has three users say user1, user2 and user3. if the default nodelimit for the agent is 10 and if i change the limit for the user1 to 50 user1 can create only 10 nodes.
Please dont hesitate ask if you need more explanation.
Thank you.
Comment #9
Lalas commentedHi all
I have noticed one more thing. we can create any user limit that is less than the default node limit of the role which contains the user.
I.e.
Agent(role) - Default node limit for a content type is 10;
User1 (of agent role) - limit 1 - 10 works. but we cant give user1 any limit greater that 10;
This is what i want to achive.
Please tell any of you have some leads
Thank you
Comment #10
dougsap commentedHi Lajas,
The only way that I can think of this working for you is to:
1) Create a new role ~agent~.
2) Create node limits for each user user of the role ~agent~
Possible limitations
The attached pdf should illustrate fairly clearly (though not exactly) the approach which would work.
Good luck! Dougsap
Comment #11
Lalas commentedHi Doug
Thanks for reply. I achieved the functionality that way only. As you said there are some limitations to this approach. There is a lead to this solution here but i did not check it, i will update soon after testing it.
Comment #12
Lalas commentedMy mistake that was mislead...
Comment #13
duaelfr#4 has been pushed to dev.
Thank you BWPanda.
Still needs review.
Comment #14
dixon_This needs backport. I need this, so I might do it
Comment #15
duaelfrI did not really maintain the 6.x version so I hope you won't run into old unsolved issues.
If you need co-maintainership, just ask.
Comment #16
dixon_Here's a very simple patch that implements the fix the same way that #4 does for the D7 branch.
Comment #18
jordanmagnuson commentedHaving a special role that just overrides everything strikes me as gimmicky, and also not very flexible (it doesn't allow specific rules to override specific other rules in a nuanced way).
I think it would be much better to simply allow sorting of the node limit rules (as you can currently do on the admin page), then give each one a corresponding weight, and apply them in descending order: when a rule matches for the current user, no further rules are applied. This would allow much more flexible overrides.
See screenshot: http://i.imgur.com/a2xvQIj.png
Comment #19
vaccinemedia commentedIs there any update on this issue? Is there a patch which allows limits to be applied by weight yet?
Comment #20
adriancidComment #21
jordanmagnuson commentedIs there a reason this was marked as "won't fix"?