Posted by izmeez on November 6, 2009 at 5:16pm
Jump to:
| Project: | Web Links |
| Version: | 6.x-2.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
It would be useful if the weblinks permissions included one for "edit all weblinks". This would help with assigning administration functions.
Thanks,
Izzy
Comments
#1
How would this differ from "edit group weblinks" or "administer weblinks"?
#2
I will try to clarify.
Having an "Edit all weblinks" permission would be helpful to distinguish between the roles of developer and site administrator (for content).
Developer would have the "administer weblinks" permissions which includes settings.
Administrator can have "edit group weblinks" which allows them to create and edit weblink groups. However, they can only edit their own weblinks. For them to modify weblinks created by other users they need an "edit all weblinks" permission which is currently not available and can only be granted by giving them full "administer weblinks" permission.
Maybe, I am misunderstanding something, but that is what I have discovered.
Thanks,
Izzy
#3
I am having trouble with this too. I want a publisher to be able to edit all weblinks but not have administration rights. I have Access Control module installed and even though I give edit permission to the publisher for the content type of weblinks - it doesn't seem to work. Not sure what to do about this.
#4
#5
I have this problem too. For most content types, it is possible set the authorisation for different roles and select if they can only edit their own content or any content. I would like to authorise a group publishers to edit any weblink (not only their own weblinks), and they should not have the other administation rights.
How can I give them permission to edit any weblink, without giving them permission to create groups or change the settings?
#6
My issue as well. I have about 45 people in charge of maintaining links. The reason for choosing this module was to prevent them from making mistakes that would happen were they just to edit HTML. Given the average technical skill level, I do not want to provide access to Administer Weblinks but would like anyone of them to correct the links created by another.
#7
Encountering a similar situation, I modified the weblinks.module (6.x-2.3) as follows:
Modified the function under the Implementation of hook_weblinks_perm starting at line 58:
function weblinks_weblinks_perm() {return array(
'access web links',
'create weblinks',
'edit all weblinks',
'edit own weblinks',
'view my weblinks',
'edit group weblinks',
'administer weblinks',
'view click count',
);
}
Modified the function under the Implementation of hook_access starting at line 167:
function weblinks_access($op, $node, $account) {
if ($op == 'create') {
return user_access('create weblinks', $account);
}
if ($op == 'update' || $op == 'delete') {
return user_access('edit all weblinks', $account);
}
if ($op == 'update' || $op == 'delete') {
if (user_access('edit own weblinks', $account) && ($account->uid == $node->uid)) {
return TRUE;
}
if (user_access('administer weblinks', $account)) {
return TRUE;
}
}
}
Note: I gave edit all weblinks both update and delete, if you want users to only be able to update existing links not delete them you would eliminate || $op == 'delete'
I will post a followup if I encounter any issues doing this.
Update: Note NancyDru's post below.
Just a disclaimer: I am not a programmer, just a Lamer, so use at own risk.
#8
@grimfandango If you can provide a patch for the changes in #7 that would make testing and review easier. Thanks.
#9
The 'edit all weblinks' check is misplaced.
#10
@izmeez @NancyDru I don't have the coding chops to create patches or know what is the correct order for checks. This is just me as a site builder hacking around for solutions to my immediate problems. If "real" coders want to run with it then feel free.