Page 1 of 1

HTML Blobs Permission bug

Posted: Wed Aug 31, 2005 12:55 am
by liquid
If you provide a group with permission to Modify HTML Blobs, the Layout menu isn't shown at all, therefore they can't modify the blobs. However, if you then provide that user with the permission to Modify Stylesheets and/or Templates, the menu is now shown and they can modify the blobs. Turns out that the code isn't putting the HTML blob code in the right permission area.

Here's the fix:

In class.admintheme.inc.php, lines 266 - 268:

Code: Select all

        $this->perms['htmlPerms'] = check_permission($this->userid, 'Add Html Blobs') |
                check_permission($this->userid, 'Modify Html Blobs') |
                check_permission($this->userid, 'Delete Html Blobs');
Move these lines to the # layout section below (I put them just after line 282).

Then, cut this from line 270:

Code: Select all

$this->perms['htmlPerms'] |
and put it at the end of line 283, so it now reads:

Code: Select all

$this->perms['cssPerms'] | $this->perms['cssAssocPerms'] | $this->perms['htmlPerms'] |

Re: HTML Blobs Permission bug

Posted: Wed Aug 31, 2005 1:51 am
by Ted
Excellent.  Thanks for that.  It's committed to svn.