Closed (fixed)
Project:
Subuser
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
11 May 2009 at 18:17 UTC
Updated:
12 Apr 2011 at 14:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
boombatower commentedBeen on vacation.
Not currently, but that shouldn't be too difficult. Are you looking for a static number or something that can be dynamically defined per user even? (possibly controlled by other modules)
Comment #2
jdblank commentedI was looking for a dynamically defined number per user.
It turns out we had to do something from scratch as we need the sub users attached to a node rather than a user as more than one user would need to add or edit subusers.
Comment #3
boombatower commentedSounds like you don't need this anymore and not something I have time to work on. So if you are alright with it I am going to mark this as won't fix for now.
Comment #4
Rosamunda commentedI´m sorry I would like to add a +1 to this... would I need to fill in another issue or I could just activate this one?
Thanks! This module rocks!
Rosamunda
Comment #5
boombatower commentedNot sure I'll have time to write this during my free time soon. If anyone wants to provide a patch or sponsor that would be great.
Comment #6
density commentedcould really do with this:
role 1 - can add 1 subuser
role 2 - can add 2 subusers
role 3 - can add 3 subusers
any help on the best way to go about this would be great
Comment #7
Juan C commented+1
Comment #8
Liembo-1 commented+1
Comment #9
hello@melmcdougall.com commented+1
Comment #10
franzkewd commentedmee too +1
Comment #11
Grayside commentedI am working on a configurable limit. Not going to tackle variation by roles or permission to override right now.
Comment #12
Grayside commentedAdds a configurable field to the settings page to specify a maximum number of subusers per user. Leave as "0" for no limit.
The patch is not configurable by role, nor is there a bypass permission to allow some roles to ignore the limit. Both of these seem like good ideas for followup issues.
This patch also adds two API functions to subuser.module. subuser_get_subusers() and subuser_get_parent(). The first one I used in this patch. The second seemed obvious to complete a matched set.
Comment #13
Grayside commentedUpload fail.
Comment #14
Grayside commentedFixed the weirdness in subuser_get_subusers() where subusers were stored as keys pointing at the parent... when we already know who the parent is.
Comment #15
vkareh commentedThis is an awesome addition to the module. Thanks for your work!
I added an extra permission: bypass subuser limit. It's a very simple permission check at the moment of subuser creation, so it should work for most cases.
Please test and let me know if it needs anything else.
Comment #16
fusedpro commentedEverything looks good.
Comment #17
blakehall commentedReviewed and tested. The patch in #15 gets a +1 from me too.
Comment #18
blakehall commentedJust a small tweak to subuser_get_subusers so that the returned array of users has the uid as the key as well as the value. This small tweak will allow us to play nicely with the user modules callbacks for blocking & unblocking when needed.
Comment #19
Grayside commentedOn visual inspection it still looks good.
Comment #20
blakehall commentedThis has been committed to the 6.x-1.x branch and will be part of the next release: http://drupal.org/commitlog/commit/7940/1882e3f4e2931afea666df5fbee6c883...
Thanks vkareh and Grayside!