HTML Blobs Permission bug

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
liquid
Forum Members
Forum Members
Posts: 59
Joined: Sun Aug 07, 2005 10:20 pm

HTML Blobs Permission bug

Post 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'] |
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: HTML Blobs Permission bug

Post by Ted »

Excellent.  Thanks for that.  It's committed to svn.
Post Reply

Return to “CMSMS Core”