Steps to reproduce:

  1. Give a role the 'Add new files to themes' permission
  2. 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.

CommentFileSizeAuthor
theme_editor_capfix.patch1.45 KBclaar

Comments

arcaneadam’s picture

Assigned: Unassigned » arcaneadam
Status: Needs review » Closed (fixed)

Thanks. I'm doing some module maintaining today so I'll get to that.