The edit mode is not detected correctly as in: http://drupal.org/node/249220
Code attached should fix this problem.
Also I have added an option that specifies what to do if there are two applicable limits for a given user - "Limit match".
"Lowest" - works as before
"Highest" - if greater applicable limit is found and user is below that limit, lower limit is ignored (and post can be successful).
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | quota_by_role.zip | 7.1 KB | vpiotr |
Comments
Comment #1
Domodel commentedvpiotr:
"Code attached should fix this problem."
I can't see any attached file. :-(
Where is it? I need it.
Comment #2
PeterZ commentedWould also like to have the "code attached to fix this problem". I don't see any attachments. Is it available?
Thanks!
Comment #3
vpiotr commentedI'm not sure how it happened but here is a correct attachment.
It is a full code file based on "5.x-8.x-dev" version.
Modified blocks are marked as follows:
//-- mod : --------------------------------------------------------------------
// [patch content]
//-- fin mod : ----------------------------------------------------------------
Comment #4
PeterZ commentedI did some quick testing and this seems to work quite well. I used "least restrictive", set up several roles, and did some testing.
I noticed that in the users "My account", the remaining quota available is not displayed correctly, although the quota itself seems to be managed correctly.
Any thoughts on what I can do to fix this?
Thanks!
Comment #5
braindrift commentedHello,
is there also a patch for 6.x?
Because after i made the changes, the quota-settings have no effect on the creation of nodes.
And in the 'My account' is displayed: 'page: You cannot create any more content of this type forever'
I created a quota of 2 for the role the user belongs to, and there are no Pages created by this user.
Thanks!