Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Decreased permissions for wysiwyg editor for non-admins

I'd like members to be able to use the wysiwyg editor, but I'd to disable their ability to upload images or files or to use dynamic objects. However, I want admins to be able to do all those things.

To do that, I hacked admin/handlers/util/wysiwyg.php and added

if (User::$user->type == 'admin') {
    $data['plugins'] = array (
        'superscript', 'alignment', 'properties', 'links', 'imagebrowser', 'filebrowser', 'table', 'undo', 'dynamic', 'source'
    );
} else {
    $data['plugins'] = array (
        'superscript', 'alignment', 'properties', 'links', 'table', 'undo', 'source'
    );
}

I then changed line 16 of admin/views/util/wysiwyg.html to plugins: {{plugins|json_encode}},

Seem like the way to go?

Comments

Sign In or Register to comment.