Hi, I have a support request which I think is very similar to the one entitled "Only the admin can use it" but that one doesn't seem to answer my question.
I have created a role called "helper". Is there a way for me to give the helper role the ability to create Events with Signups? As the administrator I get the Signup settings at the bottom of the Events creation page but I can't seem to figure out how to allow the "helper" role to get these settings unless I give it the "administer all signups" permission. I would prefer not to give this permission since I would like the helper role to only be able administer the events and signups that they create but not anyone else's.
This is what I have got installed
drupal-5.7
Event 5.x-1.0
Signup 5.x-2.4
Views 5.x-1.6
Many Thanks!!!
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 243051_signup_settings_fieldset_bug.patch | 1.93 KB | dww |
Comments
Comment #1
alt_pc commentedHello! I think I might have some more information. The signup settings do appear, but only after the "helper" user creates the event and then goes back into it and edits it. I don't know if that is normal behavior for this module. It seems to work great otherwise! Thanks!
Comment #2
dwwSee point #5 in the INSTALL.txt file.
Go to admin/content/types/event on your site.
Scroll to the bottom and look for the "Signup options:" setting
Select the "Enabled (on by default)" radio button.
Comment #3
alt_pc commentedThanks for the response! I checked that setting and found that I had already set it to enabled. So there doesn't seem to be a difference either way.
Comment #4
MedicSean37 commentedI have the same exact problem. My content type has enable signup on too. It would be create to set the signup settings when creating the node/event.
Comment #5
dwwWell, seems like this isn't "fixed" then. Perhaps it's a bug. Perhaps some will have time/ability to debug it. ;)
Comment #6
dww#254192: Signup settings not shown when creating signed up enabled content marked duplicate.
I just looked at the code, and it's definitely a bug. Here's the problem:
If you read that (admittedly convoluted) if clause, you'll see that we never add the Signup settings fieldset to the node form if $node is empty (which is what happens at node/add/...) unless the current user has 'administer all signups'. So, someone just has to fix that logic to correctly handle the node/add case.
Comment #7
yrre7 commentedCan someone help and fix this?
Thanks advance...
Comment #8
gracearoha commentedHello?
Is there anyone there who knows how to fix this? I am hopeless with code, but am happy to test :)
Comment #9
gagarine commentedtracking
I have the same probleme. The user can't have the "helper" on creation but they have the option when they edit his node already created.
Comment #10
gagarine commentedOk... i'm not sure is the good way... Now i just test if the node is empty... i'm not sure is completely safe, but it's work. Can we test if the node is in "added state"?
Sorry i can't create a patch because i'm not on my machine and i would like go to sleep so.. perhaps tomorow :)
Comment #11
gagarine commentedComment #12
yrre7 commentedIt works fine with the above code change, but I think it kinda overrides the Signup disable settings for all the content types. Which means, you can't disable the signup for the content types you want....
Comment #13
chsiung commentedI noticed this problem as well and would like to track any solutions than come up.
Comment #14
chsiung commentedHow about just adding the following check to the original code?
So you have:
I think the ($signup_type_default != 'disabled') check in comment 10 doesn't check that signup is enabled for the type and doesn't check that user has the privilege.
Comment #15
dwwOk, sorry, everyone's confused in here, and it's all my fault. That if clause is way too complicated in the first place, which is why everyone's having so much trouble with this. Furthermore, it occurs to me and starbow (sitting right next to me), that the logic was wrong for another reason: whether or not you have administer all vs. administer own perms shouldn't change the behavior in terms of node types that allow signups. If the site admin says that a given node type (foo) should allow signups (but doesn't have them enabled by default), and I can administer signups for my own content, and I can create foo nodes, I should still get the fieldset to signup-enable any particular foo node I create...
So, here's a patch that should hopefully make all the logic much more clear by splitting apart the giant if into some separate, easier-to-grok variables, and then the logic becomes very simple:
See attached patch. I tested this a bunch and I think it's good, but other eyes are welcome before I commit. ;)
Comment #16
dwwStarbow tested this and couldn't break it, so I just committed to HEAD. Yay. ;)
Comment #17
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.