Steps to reproduce:
- Give a role the 'Add new files to themes' permission
- As a user with that role, go to the theme editor
Expected behavior is that User sees 'Add a New File' drop-down box. Observed: no 'Add a New File' drop-down
The cause is most easily identifiable with the following command:
claar:/tmp/theme_editor-HEAD$ grep -ion '.*add new files to themes..' *
theme_editor.inc:77: $newfile=(!user_access('Add New Files to themes')
theme_editor.module:40: $perm[] = 'Add new files to themes';
theme_editor.module:60: 'access arguments' => array('Add new files to themes')
On line 77 of theme_editor.inc, "New" and "Files" begin with uppercase letters, which doesn't match how the permission is defined in theme_editor.module. The attached patch against HEAD fixes this.
| Comment | File | Size | Author |
|---|---|---|---|
| theme_editor_capfix.patch | 1.45 KB | claar |
Comments
Comment #1
arcaneadam commentedThanks. I'm doing some module maintaining today so I'll get to that.