Closed (fixed)
Project:
Author Select
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Jul 2010 at 15:58 UTC
Updated:
22 Aug 2010 at 19:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
mcrittenden commentedAh, great idea. So ideally you'd like it if the only options in the dropdown list were users with permission to add content of that type?
Comment #2
bleen commentedexactly ... I'm happy to help when I have a few free minutes ... Lemme take a swing at a patch this weekend
Comment #3
mcrittenden commentedSounds great, thanks. If you don't have time or just lose interest, just let me know.
Comment #4
bleen commentedThe more I think about this the more I think maybe there should be a config setting for this. Its conceivable that some sites will want ALL users (regardless of roles) in the dropdown, but I feel like most sites would prefer it this way.
I'm also not sure if the anon user should always be in the list, or only if it has correct permissions. For now, always...
Thoughts?
In any event, this is a good start IMO.
Comment #5
mcrittenden commentedAwesome, thanks for the patch.
Can't we remove the ORDER BY here?
IMO, yeah, anon probably should be treated like any other role, and not always included.
Should be if !empty?
As for the option, I agree that it would be a good idea, but I'm unsure where to put it. It doesn't really deserve a page of its own, so maybe on the User Settings page?
Comment #6
bleen commentedThis patch fixes the minor issues pointed out above ... and no longer includes the anon user unless it has the correct permissions.
As for the setting ... maybe it go on the content config page (/admin/content/node-type/story)?
Comment #7
mcrittenden commentedComment #8
mcrittenden commentedTested and committed, and rolled beta2. IMO, you're right that this will almost always be the default behavior, so it's OK to go ahead and commit this without a setting (temporarily). Setting can be handled in #858294: Add a setting to allow selecting ANY user, not just users with permission to post that content type.
Thanks for the awesome patch!
Comment #10
ChrisLaFrancis commentedI ran into an issue with trying to change the author of blog entries after I migrated a website from Ning to Drupal. Basically, the problem is that the permissions for blog entries are listed as "create blog entries" and "edit any blog entries" rather than "create (content type) content" and "edit any (content type) content"... so for the "blog" content type, the word "entries" replaces "content".
Anyway, in author_select.module I changed line 48 from
$permissions = array('create ' . $node->type . ' content', 'edit any ' . $node->type . ' content');
to
$permissions = array('create ' . $node->type . ' content', 'edit any ' . $node->type . ' content', 'edit own ' . $node->type . ' content', 'create ' . $node->type . ' entries', 'edit any ' . $node->type . ' entries', 'edit own ' . $node->type . ' entries');
Also, you'll notice that I included the "edit own" permissions for all content types, as well as the "edit any" permissions.
Hope this helps someone else out if they run into the same issue.
Comment #11
mcrittenden commented@fivefrank: would you mind creating a new issue for that? That's a good point.
Comment #12
ChrisLaFrancis commentedDone. Sorry it took so long.
http://drupal.org/node/890312