Thanks for the module! It implements the the todo list that I had planned for the Domain Administration Helper module :)

I think since these two modules have complementary functionality, we could combine these two modules to create a really great admin delegation suite!

One thing - to really granularize the permissions, I would split the 'administer own domain' permission into

'administer own domain settings'
'administer own domain configuration'
'administer own domain theme' (there are definitely use cases where people would want one and not the other)

Similarly, the the Domain Administration Helper module has lots of granular sub-permissions.

I think you have the better name :) so we can put the project here if you want. Let me know if this is a good idea and I can work up a patch that includes both our modules.

Comments

ergonlogic’s picture

Hello, nirbhasa.

I'm certainly open to the idea. Let me review your module to ensure it's a good fit.

Note that the way I've implemented the permissions is perhaps a little unusual, though it accomplishes the same as you suggest. The difference being that 'administer domains'/'administer own domains' determines the scope of the permission, whereas the 'administer domain settings', etc. determine the access to the individual tasks. Admittedly, your suggestion is probably clearer, but then it also entails twice the number of permissions. I'll give it some further thought.

Regards, C

nirbhasa’s picture

Yes - and I also have a whole bunch of permissions in Domain Admin Helper :) There are usecases for more granular control, but also use cases where you just want to give your editors total domain rights and not want to bother with a whole bunch of checkboxes

Heres a suggestion thats easy to do - create a radio field in the Domain settings page that goes something like

- Create one 'administer own domain' permission
- Create multiple permissions to handle different domain administration tasks

This basically influences the permissions in hook_perm (we also may need to clear any existing domain_admin permissions).

Then for permissions we call a domain_admin_content_access($perm) function that says


if(variable_get('domain_admin_permissiontype','single') == 'single') { 
    return user_access('administer own domain');
}
else return user_access($perm);

brt’s picture

Hi,
thanks for this module, it solves a major problem for me.
What I would like it to be (for a start):

Delegate the following permissions to domain-administrators:
- domain settings
- theme
- content
- users
- blocks
- taxonomy?

Provide intuitive navigation for these features
- maybe an admin-block, like "Domain Administration Helper" seems to have, or something equivalent that only shows up when you have "administer domain" rights. I would prefer standard functionality like "create content" to not be part of this navigation.

I'm testing this and will provide feedback soon.

ergonlogic’s picture

Title: Suggestion to merge with Domain Administration Helper? » Merge with Domain Administration Helper
Version: 6.x-0.2 » 6.x-0.3

@nirbhasa: Having reviewed your code and documentation, I'd be happy to join forces. I've granted you CVS access, which I believe is all that's required on my part to make you co-maintainer. If not, let me know. Also, I think your suggestion about more granular permissions is sound. Perhaps we can discuss (on IRC or something) our respective visions and TODOs, so as to avoid conflict and duplication.

@brt: Thanks for the suggestions and feedback. Keep 'em coming. I would, however, recommend creating a separate issue next time.

nirbhasa’s picture

Thanks ergonlogic! Youre right, thats all thats required.

Ill keep an eye out for you on IRC, or you can send me a mail. I don't have enormous TODO plans (one or 2 ideas, perhaps :) ) so im happy to hear any ideas you had. I think the main thing is to get the merged module up and working.

Heres a suggestion - how about I commit a merged module to HEAD, then we can test it and if we're happy we can then tag a release

ergonlogic’s picture

Sounds like a plan, nirbhasa!

My principal TODO, at this point, is fixing a bug: #789670: Adding permissions causes bug in domain_view() that's been hanging around for awhile. I'd also like to #789698: Add ability to choose which themes are available to domain admins.

Down the road, I'd like to look for opportunities to integrate with Aegir and Registrar_API (this last for which I am also co-maintainer, BTW.)

nirbhasa’s picture

Just a quick note to say i havent forgotten this - I have a basic merge working locally and hope to commit something in the next week

nirbhasa’s picture

Ok - a basic merge is now in HEAD. I have tested it and it seems pretty good so far, but I havent tagged it. I'll be putting it on a production site this week, so lots of non-technical domain users will have the chance to post issues.

So far:

  • I added a permission granularity radio button to the domain settings page, so the user can choose between one single 'administer own domains' permission or multiple little permissions. It seems to work fine, I had to add a little something to get it to work with the admin_role module, but nothing big. I also had to modify the domain_user_access function a little and farm out the domain checking to another function.
  • For the most part, I managed to merge the two modules without significant changes to either. A couple of small things - the access to admin/build/domain was covered by 'administer own domains', so for multiple granularity I included a 'access domain overview page' permission. I also have a 'edit own domain record' permission to admin/build/domain/edit/% and kept 'configure domain settings' permission for admin/build/domain/conf/%/ However in both cases, I am happy to go with whatever people think. No point engaging in permission overkill for the sake of it.
  • My existing module had integration with the Book Page Access module (basically domain managers can delegate edit access to child pages on their domain). It depends on a patch to that module which has now been posted, lets see how that goes...
  • I also took brt's suggestion and put some checkboxes in the domain settings page so people can choose which links appear in the domain admin block. In addition, I included another hook to allow external modules to add their own links to the block (it gave me the opportunity to farm out some custom stuff I had there to my own custom modules)
nirbhasa’s picture

Status: Active » Needs review

Forgot to set status :)

ergonlogic’s picture

Thanks nirbhasa! From a quick look at the code, this looks great! I'll test it out over the next couple days, and provide feedback. Assuming all goes well, I think a new release will be in order.

My existing module had integration with the Book Page Access module (basically domain managers can delegate edit access to child pages on their domain). It depends on a patch to that module which has now been posted, lets see how that goes...

So, does the current code require said patch, or is that still in your private dev version? I'd prefer not to have any dependencies on patches to other modules, but we could create a new branch for experimenting with such "advanced" features.

ergonlogic’s picture

Version: 6.x-0.3 » 6.x-1.x-dev

fixing version

nirbhasa’s picture

That Book Page Access code requires the aforementioned patch. If they don't commit the patch soon, im entirely ok with stripping the integration code out. I can probably implement the integration i need in a custom module. Ill wait until the weekend, and if nothing happens, then I'll wield my scalpel :)

ergonlogic’s picture

Status: Needs review » Fixed

Apart from a couple minor bugs, this appears to work as advertised. I've created a new release to mark the occasion.

nirbhasa’s picture

Great stuff! I changed module page to reflect new functionality (please feel free to change), and am working on adding a README file

nirbhasa’s picture

Another thing - could I say at the end of the module page Module developed by Ergon Logic Enterprises and Vasudeva Server? A few people on our team worked on the Domain Admin Helper module, so I'd like to give some credit where credit is due :)

nirbhasa’s picture

Ok - added README to HEAD and updated link to documentation on domain homepage.

ergonlogic’s picture

Sure, great suggestions.

nirbhasa’s picture

Status: Fixed » Closed (fixed)