Closed (outdated)
Project:
Event
Version:
5.x-1.0
Component:
Basic Event
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 Oct 2007 at 02:35 UTC
Updated:
13 Apr 2018 at 21:35 UTC
Jump to comment: Most recent
Comments
Comment #1
lsommerer commentedoops, I submitted this with the wrong version information. It should be 5.x-1.0
Comment #2
nancydruThe node module has a function: node_type_update_nodes($old_type, $type). Or you can do it in phpMyAdmin.
You can create another node type and specify that it is event-enabled. That will give you new access permissions that will allow you to grant the editing rights.
Comment #3
pheraph commentedThanks, that helped to fix the problem. Is it possible to convert the existing events with the node-type "event" to my new node type?
Comment #4
nancydruYes, by the method I mentioned above.
Comment #5
modctek commentedJust curious, is this by design? ie. nodes of type 'event' will only ever be editable by the author?
NancyW, when you say "the method mentioned above" do you mean convert the existing nodes to the new node type via phpMyAdmin, or is there a way to do this through the GUI in the Administration menus of the Node module?
Comment #6
nancydruI don't know of a GUI way to do it, but I have thought about writing it - it shouldn't be difficult.
You either need to create a little PHP page using the function I described, or go into PhpMyAdmin. Note that if you create a content type with CCK, you may not be able to do either method unless all the field names are identical.
I don't know if there are more permissions in Vers. 2. I have created two other event-enabled content types on my site ("Community" and "Holidays"). They do have "Edit" as well as "Edit own" permissions. So I guess the key is to not use the default content type and create a new one, then you can do what you want.
Comment #7
Jeff_Pflueger commentedI'm a bit fearful of creating a new node type and then converting all the events we have to that new type just to allow other people (other than the author and the admin) to edit any event.
Seems weird to me that events in the event module can only be edited by the author.
Is this a bug with the module or intentional?
How difficult to hack and change so that on the Access control page we have a check box that says "edit events" and allows that versus "Edit own events" ? If this is easy enough, I'd rather do that than create a new node type, etc etc
Comment #8
nancydruWell, in version 2 there will be no "basicevent" so you can start practicing for creating your own content types now.
Comment #9
Faye-1 commentedIn the implementation of hook_perm(), I added an extra option 'edit all events':
function basicevent_perm() {
return array('create events', 'edit own events', 'edit all events');
}
and in the implementation of hook_access() I give access for updating or deleting of all events to users with 'edit all events' marked in the access control:
function basicevent_access($op, $node) {
global $user;
switch($op) {
case 'create':
return user_access('create events');
break;
case 'update':
case 'delete':
if ((user_access('edit own events') && ($user->uid == $node->uid)) or (user_access('edit all events'))) {
return TRUE;
}
break;
}
}
Normally this workaround should work.
Greetings, Faye
Comment #10
japerryEvent for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.