At the moment a user seems to need 'assign domain editors' permission to see a list of their assigned domains upon login.

Perhaps there is a good reason for this - if not, this patch takes that permission away, and also makes each domain name in the list a link to that domain, so users can go quickly to any of their assigned domains upon login.

Comments

agentrickard’s picture

Status: Needs review » Needs work

There is a reason. The intent is that domain assignments should be invisible to non-privileged users. (This was an initial feature request.)

Instead of removing that permission, better to create a new permission that affords the visibility you want to provide. Something like 'view my assigned domains'.

A patch would also need documentation.

nirbhasa’s picture

StatusFileSize
new829 bytes
new1.15 KB

Added 'view my assigned domains' permission, and added documentation in README.txt

agentrickard’s picture

Hm. This brings up a question, though. As implemented 'View my assigned domains' would let a user with access to your profile view your domains. So this either needs to be the perm 'view users domains' (so you can see all users' domains) or the IF needs a check that $user->uid == $account->uid (or user is an admin.)

nirbhasa’s picture

My particular usecase merely requires the user to be able to view their domains upon login (mainly to create a good starting point for newbies entering the site for the first time) so the second would suit me best:

if (user_access('view my assigned domains') && $user->uid==$account->uid) || user_access('assign domain editors') ) 

But I'm easy either way :) You could create 2 permissions to cover both eventualities, but I'm not sure I see a common use case for the first option. Anyway, let us know what you think and ill do another patch. I also need to create a link for the primary domain.

agentrickard’s picture

I think I see this as a stand-alone module. We have far too many permissions and configurations in the core module right now.

agentrickard’s picture

Status: Needs work » Postponed
nirbhasa’s picture

So we did this as a small module (probably too small to get a CVS account for) which is available on our github repo...

agentrickard’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev

You might submit it to the Domain Bonus pack.

http://drupal.org/project/domain_bonus

nirbhasa’s picture

Status: Postponed » Closed (fixed)

Great idea! Created issue there; closing this ticket.