Closed (fixed)
Project:
Skinr
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2010 at 21:56 UTC
Updated:
3 Jan 2011 at 21:50 UTC
Jump to comment: Most recent file
admin/appearance/skinr/edit/%skinr_js/%/% has the wrong permissions check. It causes the bug in #891942: class lost when editing block and user doesn't have "access skinr classes" permission to not be apparent.
Attached patch fixes these permissions.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | skinr-permissions.patch | 5.43 KB | jacine |
| #14 | skinr-permissions.patch | 4.79 KB | jacine |
| #1 | skinr_995080_1.patch | 527 bytes | moonray |
Comments
Comment #1
moonray commentedAnd here's the patch.
Comment #2
jacineCommitted! thanks :)
http://drupal.org/cvs?commit=462678
Comment #3
sunIt is *very* unusual that a menu path starting with 'admin/' is accessible with a non-administrative user permission. It sounds like this almost invisible change revealed/resolved some other issue. Therefore, it would be a good idea to prepend an inline comment to explain why this path can be accessed without administrative permissions. Otherwise, the next one touching these lines might "fix" the permission.
Powered by Dreditor.
Comment #4
jacineThe problem here is that the permissions are named poorly. It's is not a non-administrative permission. This is not the first time the "access skinr" permission has confused people, so we need to fix that.
BEFORE
I was thinking something along these lines would be better...
AFTER
Once we flesh this out, we can work on an actual patch.
Comment #5
moonray commentedDescription for 'administer skinr' should probably include that it will automatically give you 'edit skin settings' and 'edit advanced skin settings', even if they're not enabled.
Comment #6
jacineIsn't that implied? Looking at core permissions, the only "administer x" permissions that contain a description have warnings that giving the permission has security implications. Skinr doesn't fall in that category, so that's why I didn't add anything. We could add something anyway, but it might be a little much.
Comment #7
nomonstersinme commentedI agree that the permissions are confusing and need to be reworded... i also think it couldn't hurt to add a note for some about 'administer skinr' just because some people don't realize that..
Comment #8
jacineOk, well suggestions for what to write there are welcome. :)
Comment #9
sunThe are no security implications, so we don't need a warning. Whether we want to turn the administer skinr permission into a superglobal-one-eats-all permission is something we can decide freely. It probably makes sense, but I guess some code needs to be updated to actually apply that meaning.
Lastly, please note that
'description'keys in permissions should be avoided, if possible. Instead, thetitleshould be phrased in a descriptive way. Developers can deal with internal and not so descriptive permission names like access skinr or edit skin settings, but on the permissions screen, users should always see permission labels that are crystal-clear.Comment #10
nomonstersinme commentedI like what you suggested above in post #4... makes sense, worded well.
Comment #11
jacineOk... So, I should take #9 and #10 to mean the suggestion in #4 is ok, or should I remove the description there as well.
Also, as far as I understand, "administer skinr" is already a superglobal-one-eats-all permission.
Comment #12
coltrane#4 seems good, though I think the 'edit advanced skin settings' description could be dropped. At the moment are there advanced settings besides CSS classes?
Comment #13
jacineNo, not ATM since we removed template file support. I'm not ready to drop this yet because eventually I'd like to add template support back there, as well as some other features (like choosing a wrapper HTML5 tag) and people do use this functionality. I'm not totally against removing it, but we should discuss in a separate issue.
This needs is a patch, so setting to active, since there isn't one. This is an easy one... Any takers?
Comment #14
jacineOk, here's a patch for this.
Comment #16
sunTests are failing, because the only existing test we have fails to grant the user permissions. YAY for tests! :)
With this patch, the
administer skinrpermission is not "global", but we can leave that for a separate follow-up issue. Actually, superuser-permissions are not really easy to implement.Powered by Dreditor.
Comment #17
jacineOopsie!! Forgot about the test! :P
Comment #18
vrajak@gmail.com commentedThis patch certainly applies fine, but I can't say if it did everything its supposed to. I'm trying to use it in conjuction to the class lost issue (http://drupal.org/node/891942)
If you need anything more specifically tested, just say so and I'll try.
Comment #19
moonray commentedLet's commit this and then work on fixing the superglobal-one-eats-all permission (where it's not already working) for 'administer skinr' after that.
Comment #20
jacineOk, committed: http://drupal.org/cvs?commit=467354