Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is there an interface where the administrator (or a user with proper permissions) can set the user relationships? I've looked for documentation on this but couldn't find much.
Specifically, what i would like to do is have the admin, or just certain users, set the relationships of other users. These other users should not be able to set their own relationships.
Some thing like this is very helpful for situations where users are clients and clients are handled by an outside affiliate and you dont want affiliates to be able to add clients that aren't really theirs.
thank you! great module!
Comment | File | Size | Author |
---|---|---|---|
#8 | users_relationship-admin-450652-1.patch | 1.22 KB | MisterSpeed |
#8 | users_relationship-theme-450652-1.patch | 822 bytes | MisterSpeed |
Comments
Comment #1
mtsanford CreditAttribution: mtsanford commentedThis functionality does not exist in the main module or any of the other submodules that hook into it as far as I'm aware.
This is something that would probably be possible to do as a submodule that hooks into the main User Relationships API module.
Comment #2
alex.k CreditAttribution: alex.k commentedYou are correct. Personally I've been using masquerade to manage other users' relationships, but that may be too powerful of a solution for your case.
Comment #3
akolahi CreditAttribution: akolahi commentedI curious if others are interested in adding a permission for users to be able to set other users' relationships. This module is so powerful and can be used in so many other applications other than for social networking. By allowing a user role to be able to set other user's relationships (but those users cant set their own relationships) it opens up so many possibilities for this module to be used as an organization management system i.e. clients, managers, employees, team leaders etc.
I would be willing to chip in for such functionality so long as it's contributed back to the drupal community. Thank you.
Comment #4
alex.k CreditAttribution: alex.k commentedAgree completely with your direction. That is where I want to take UR. Time permitting, will try to work some of these features into the project, hopefully with help from others.
Comment #5
patchak CreditAttribution: patchak commentedHey there, so my feature request is to allow site admin to set certain relations as "Locked" especially to disallow the requestee to remove the relation with someone that just points to them.
My use case is doing a "follower", "followed" feature. The followed person should not be able to remove the relation to someone that is following them, or at least that should be an option??
Thanks!
Comment #6
MisterSpeed CreditAttribution: MisterSpeed commentedComment #7
alex.k CreditAttribution: alex.k commented@63reasons let's figure out an approach to make this work. I was thinking of adding controls to set which roles can do what actions with a relationship type. The UI and implementation would be similar to #228206: Different types of relationships per role type. Actions would be:
To address request in #3 we need to think of a good user interface. If folks have ideas, it would be good to hear. Thanks.
Comment #8
MisterSpeed CreditAttribution: MisterSpeed commentedPlease find the patch files for the allow disallow remove link change. admin can change the setting for this option,
Let me know if this work, or you want some different way.
thanks,
Comment #9
alex.k CreditAttribution: alex.k commentedComment #10
alex.k CreditAttribution: alex.k commented@63reasons this needs to be configurable per relationship type. Please see implementation of #228206: Different types of relationships per role type, e.g. http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/user_relati... line 150.
I would also change the table user_relationship_type_roles and add columns for each of the different type of permissions that we're adding. The table was created to support just one permission, so it did not need to denote what exactly an entry means. We would need to add columns can_request, can_accept, can_delete to this table and tie in admin interface as well as checks in the UI to respect these options. Feel free to postpone if you're not yet familiar enough with the code. Thanks looking into it.
Comment #11
MisterSpeed CreditAttribution: MisterSpeed commentedComment #12
raintonr CreditAttribution: raintonr commentedI'm thinking that it might be useful to have relationships controlled only by an admin.
Ie. would want to loose all the links on profiles that request relationships (should be done with a permission), and replace with a section that allowed an admin to create/edit/remove relationships without needing approval.
This would be useful when a HR department user has full control over relationship tree in their organisation for example.
The form would have something like
Then, when a department goes from one manager to two for example, and half the staff report to this new manager, the admin can edit the staff members (sadly, one by one) and change the manager relationship to the new manager (user).
Comment #13
akolahi CreditAttribution: akolahi commentedI agree that allowing an admin permissions to have control over user relationships should be independent of the permission of whether users can add/create their own relationships.
Comment #14
akolahi CreditAttribution: akolahi commentedalex.k, I would be able to provide some monetary help in the development of this - if that would be helpful in expediting it's development.
Comment #15
alex.k CreditAttribution: alex.k commentedI have some ideas on how to do this in a reusable fashion... Meanwhile can you summarize all the different use cases (actions) that admin should be able to do, so we have a single place of reference rather than strewn across various comments. That would help make sure that everything is accounted for in design. Thanks.
Comment #16
jtjones23 CreditAttribution: jtjones23 commentedWould also love to be able to administer user relationships. I'm setting up a mentor/mentee project for the fall. Each mentor will have 4 mentees and I'd rather assign the relationships rather than have them choose the relationships.
I'm willing to test patches.
Thanks for all the hard work.
Comment #17
akolahi CreditAttribution: akolahi commentedI'm thinking:
* each relationship type should have a role-based permission of whether a member of that role can or cannot request that particular relationship type for themselves. There are applications where you don't want members of a certain role to be able to request certain relationships.
* each user relationship type (i.e. manager/workgroup) can have a 'relationship type admin' (role permission based) that allows the type admin to set that particular relationship for other users. Thus someone may be a relationship type admin of one relationship type but not necessary of another type.
*what would be EXTREMELY helpful for my application would be the ability for users of a particular role, to be able to add users and by doing so there is an implied relationship automatically applied. For example affiliates can add their customers (on their behalf) and by doing so there is automatically an affiliate/customer relationship applied. there is a module for users to be able to add other users... i'm not sure how easily that can be integrated.
Comment #18
Bilmar CreditAttribution: Bilmar commentedquick note that Manuel Garcia has made the first * from #17 at http://drupal.org/node/327624 into a patch.
I have tested and it works great! =)
Comment #19
DrupalSza CreditAttribution: DrupalSza commented"I'm thinking:
* each relationship type should have a role-based permission of whether a member of that role can or cannot request that particular relationship type for themselves. There are applications where you don't want members of a certain role to be able to request certain relationships."
- absolutely - have you had any success with this one? role-based permission as to whether or not a user of type A can request/receive specific relationship?
Comment #20
Bilmar CreditAttribution: Bilmar commentedHello, I was wondering if there has been any further development in this area?
#327624: Extend role access to configure "which roles are allowed to receive this relationship" has been brought up to the last dev.
Regards
Comment #21
joostvdl CreditAttribution: joostvdl commentedsubscribe
Comment #22
Todd Zebert CreditAttribution: Todd Zebert commentedsubscribe
Comment #23
Hitbysubscribe
Comment #24
HitbyRe #12 raintonr - has there been any progress made with regards to this functionality - or has anyone found another way to accomplish the same thing?
Thanks
Comment #25
raintonr CreditAttribution: raintonr commentedRe: #24. You could implement user node then put a CCK user ref field on the user nodes and then use field permission to limit who can set these. There is also a CCK field for two way relationships that could complete the set.
Comment #26
mrf CreditAttribution: mrf commentedThe whole idea of how relationship permissions are managed is changing for 7.x so the approach would be very different for this type of feature and 6.x is now in maintenance mode with bugfixes only.
Feel free to open a new issue against 7.x if admin relationship editing is still needed with the new permissions available.
Comment #27
kingswoodute CreditAttribution: kingswoodute commentedHi,
I'm using User Relationships in D7. How do you set up relationships for other users?
I'd like to be able (as superuser) to define relationships between other users but I'm not sure how to do this.
Great module, thanks very much!