Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
simpletest.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
9 Dec 2011 at 14:56 UTC
Updated:
12 Jul 2012 at 08:27 UTC
Jump to comment: Most recent file
Comments
Comment #1
xjmFWIW, +1 on the RTBC. :)
Comment #2
sundrupal8.test-drupalcreateuser.0.patch queued for re-testing.
Comment #3
sunUpdated the issue summary to explain the change.
Comment #4
catchYeah this looks completely fine to me, the fact no tests need to be changed at all shows these permissions as redundant.
The only caveat here is that if we change the default permissions for the authenticated user role, then tests might need to be updated, but I doubt we'll do that for comments anyway, and really only tests in comment module should break in that case (and rightly so). So committed/pushed to 8.x. fwiw I think it looks like a good change for 7.x as well but not sure what we gain from the backport? That might need fleshing out a bit, but up to webchick of course.
Comment #5
sunThanks!
Identical patch for D7, only change is /core dir.
Comment #6
webchickAt first glance, this seemed like a no-go for D7 since it looked like it would change the default permissions assigned to users out from under various test authors' feet. However, as explained both in this issue and in the PHPDoc of drupalCreateUser(), what it's actually doing is avoiding the work of creating additional roles if there are no additional permissions, and just defaulting them to whatever auth user has. Makes sense.
So this seems like a harmless change for D7, although I guess if anyone is using their own custom testing profile, and they've customized the default permissions for auth user to not include the comment permissions, and they are nevertheless depending on all users having comment-related permission already in their tests, they'll see breakage. That seems pretty edge-casey to me. It seems far more likely that the code as it is would create a WTF for them since they never specified comment permissions, and so would have to explicitly undo that. I guess in any case, we still have enough time before the release next month for someone to catch that on their dev server, if it bites anyone. Let's give it a shot.
Committed and pushed to 7.x. Thanks!
Comment #8
cweagansUpdating tags per http://drupal.org/node/1517250
Comment #8.0
cweagansUpdated issue summary.