Topic: Security

Is it possible to change the level of security such that users cannot edit or delete other users nor the administrators blocks and pages?

mattbastin's Website

Re: Security

User Roles in Monstra:
Users - cant access admin panel
Editors - cant acess admin panel and can use pages manager, blocks manager, files manager.
Administrator - God Mode smile

Re: Security

Yes, thanks. But is it possible to alter these settings?
Could I, with some knowledge of PHP change it myself or could it be included in an updated version? I am mainly interested in denying access to blocks by the editors and also only allowing each editor to accesss his or her own pages.

mattbastin's Website

Re: Security

    if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {
      // pass   
    }

Re: Security

In Blocks Plugin you can change this

    if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {
        // Include Admin
        Plugin::admin('blocks', 'box');
    }

to that:

    if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {
        // Include Admin
        Plugin::admin('blocks', 'box');
    }

Re: Security

Thanks very much. Your solution has worked the way in which I had hoped and intended.

mattbastin's Website

7 (edited by Lucas Abregu 2012-07-29 15:15:44)

Re: Security

Hey, here  I am mainly interested in denying access to blocks by the editors and also only allowing each editor to accesss his or her own pages.

ottawa office supplies