Posted by Duncan Pierce on July 30, 2007 at 3:05pm
Jump to:
| Project: | Content Type Administration by Organic Group |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | rconstantine |
| Status: | closed (fixed) |
Issue Summary
When a group admin disables the creation of new nodes of a XYZ type in the group that does not imply users with "edit XYZ content" or "edit own XYZ content" should not be allowed to edit existing XYZ content in the group (and indeed in my current use-case I want them to still be able to edit).
OGCTA allows users to start the editing process, disabling the "audience" checkbox for that group, and gives an error ("An illegal choice has been detected. Please contact the site administrator.") if they actually submit the edited node.
I'm using it with OG 5.x-3.1 and also have OG Mandatory group (unversioned, probably current) enabled.
Comments
#1
I could cop-out and simply mark this as 'by design' as I don't think this will be a common use-case. However, I'm marking this as a feature request instead. In designing this module, the intent was for the admin to define content types at the creation of site and possibly add content types as time went on, but not to take anything away. I would imagine that you had an existing site where people had already created content of various types that you now want to restrict.
I'll look into the difficulty of making this change for you (and others adding this module to existing sites).
Hopefully, everything else seems to work for you.
BTW, have you checked out my og_multiple_mandatory_groups_by_role module?
#2
Maybe it will help if I outline what I'd like to achieve.
I am setting up a Drupal-based website for organizing a conference. I'm using an Organic Group to handle the call for session proposals because, unlike most conferences, we demand a lot of interaction (peer review, commenting and finally voting) between people proposing sessions. Whichever session proposals (a CCK type) are chosen will be made public and will eventually be incorporated into conference programme. So the entire workflow happens on the site.
We use OG to (a) moderate access to the group of submitters (b) keep everything private until the programme of sessions is decided (c) keep everyone informed about all the new proposals/comments. The intention is that each year a new OG will be created, so we can keep all the old session proposals for people to carry forward if they want to. Another wrinkle that is unlike other conferences is that people who submit sessions can edit them at any time - basically to improve them or to add feedback about how the session went, photographs of outputs etc. So OG's almost perfect for our needs.
We also have a call for poster proposals (which are a different CCK type). People can present posters at the conference, and usually such people would already be attending for some other reason. We'd like to have an organic group for managing poster proposals too.
All fine so far, except past a cut-off date we want to stop people submitting new sessions (but still be able to edit their own existing ones). We want the same for posters too but with a different cut off date. CTA is almost perfect for this because it gives the power to do that to the group admins (who are programme or poster chairs for the conference) except for the above-mentioned problem with editing.
So, how many people who also want this I can't say, but in this situation it's definitely useful and editing is definitely required unless there's some neat work-around to get the same thing I haven't thought of.
Despite being a relative Drupal newbie I have made some contributions already so I'm willing to help tackle this.
Thanks for the pointer to og_multiple_mandatory_groups_by_role - I will check it out.
#3
OK, I'm getting around to this.
Question: I assume there is no problem accessing (viewing) the existing page types for those types no longer allowed, correct?
Question: I also assume there is no problem accessing the edit tab of the same, correct?
So you are saying that the only issue exists in submitting the pages, correct?
I will proceed under those assumptions. Let me know.
#4
So I think this may be a super simple fix. Although I will update the tarball soon, you can make the change manually.
Find the function called : og_content_type_admin_form_alter
Find the line that looks like this: if (_og_content_type_admin_is_admin($group)) {
Change it to look like this: if (_og_content_type_admin_is_admin($group) || (arg(2) == 'edit')) {
Let me know if it works.
#5
Several days (and an email to the original poster) have gone by without a response here, so I'm marking it as fixed since it seems to be to me.
#6
Sorry Ryan, I'd taken my eye off email for a few days.
Great work - thanks for moving this forward. I should be able to test today or tomorrow. I will reopen if there's a problem but your change looks right to me.
#7