Welcome Guest, Not a member yet? Register   Sign In
MX_ACL - Access Control library
#20

[eluser]iansane[/eluser]
[quote author="wiredesignz" date="1241490109"]Hi Johan Andre,

MX_Acl does not require any interaction from your controllers.

MX_Acl checks the URI and session userdata "role_id" (and IP address) against its cached access control list and automatically redirects if access is denied to that user.

Session flashdata is set with your access denied "error_msg" and session userdata "return_url" is set with the current URI in case you wish to return to the same location after a login procedure.

Most of the configuration variable names are customizable to suit your own application.

Hope this helps.[/quote]

Hi, I have copied all of the files (used the php5 version and the php4 version) but it doesn't appear to do anything. If you don't use it in controllers then how does it work? I added a array for 'welcome' page and set the allowed ip to 127.0.0.2 but it seems to be ignored. I don't get any errors. I just get directed to the welcome controller.

Can you explain the cached access arrays?

For example I want to restrict access to the welcome controller for a test so I have this array:
Code:
'welcome'    => array(
        'allowed'    => array(1, 2, 3),
        'ipl'        => array('127.0.0.2'),
        'error_uri'  => (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] :   site_url('noaccess'),
        'error_msg'  => 'You do not have permission to update this page!',
    ),

I made a noaccess controller and noaccess view so it would have something to redirect to. I don't know what the array(1,2,3) numbers mean or how to set what they mean.

Can you provide an example of usage and how to set the roles for role_id 1,2,3 ?

Thanks


Messages In This Thread
MX_ACL - Access Control library - by El Forum - 04-17-2009, 05:27 AM
MX_ACL - Access Control library - by El Forum - 04-17-2009, 05:32 AM
MX_ACL - Access Control library - by El Forum - 04-17-2009, 04:11 PM
MX_ACL - Access Control library - by El Forum - 04-17-2009, 11:00 PM
MX_ACL - Access Control library - by El Forum - 05-04-2009, 11:57 AM
MX_ACL - Access Control library - by El Forum - 05-04-2009, 07:21 PM
MX_ACL - Access Control library - by El Forum - 05-04-2009, 07:39 PM
MX_ACL - Access Control library - by El Forum - 05-04-2009, 07:43 PM
MX_ACL - Access Control library - by El Forum - 05-04-2009, 07:51 PM
MX_ACL - Access Control library - by El Forum - 05-04-2009, 07:55 PM
MX_ACL - Access Control library - by El Forum - 05-04-2009, 07:57 PM
MX_ACL - Access Control library - by El Forum - 05-16-2009, 11:47 AM
MX_ACL - Access Control library - by El Forum - 05-16-2009, 11:48 AM
MX_ACL - Access Control library - by El Forum - 05-16-2009, 06:43 PM
MX_ACL - Access Control library - by El Forum - 05-17-2009, 01:52 AM
MX_ACL - Access Control library - by El Forum - 10-02-2009, 08:14 AM
MX_ACL - Access Control library - by El Forum - 10-27-2009, 09:21 AM
MX_ACL - Access Control library - by El Forum - 11-28-2009, 04:32 PM
MX_ACL - Access Control library - by El Forum - 11-11-2010, 10:23 AM
MX_ACL - Access Control library - by El Forum - 03-26-2012, 06:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB