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).

CommentFileSizeAuthor
#3 quota_by_role.zip7.1 KBvpiotr

Comments

Domodel’s picture

vpiotr:
"Code attached should fix this problem."

I can't see any attached file. :-(
Where is it? I need it.

PeterZ’s picture

Would also like to have the "code attached to fix this problem". I don't see any attachments. Is it available?

Thanks!

vpiotr’s picture

StatusFileSize
new7.1 KB

I'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 : ----------------------------------------------------------------

PeterZ’s picture

I 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!

braindrift’s picture

Hello,

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!