Role based Access Control List (ACL) |
[eluser]vukasin0[/eluser]
Hi All, I've created Role Based ACL Library to mach my project needing and want to share it with you. I know that there is some ACLs available here but didn't find any ROLE Based (maybe I missed some ). Here you can find code and examples with sample data: Quote:https://www.dropbox.com/sh/ajy750jlito6dyc/GblTsK2g7X EC_ACL.sql - MySql DB Tables Prerequisite Code: mysql --user=root --password=password --database=test < EC_ACL.sql EC_Acl.php - Library - put in your Application/Library folder --Manually load library: Code: $this->load->library('EC_Acl'); // Moved to autoload --Autoload library (preferred way): Quote:In: {CI_Root}/application/config/autoload.php Code: $autoload['libraries'] = array('database', 'session', 'EC_Acl'); EC_ACL_login_controller_example.php - complete login and authentication process demo. EC_ACL_get_object_access_example.php - provide roles access for objectid in user authenticated session demo. EC_ACL_example_data_INSERT.sql - Sample data which should be used for demo Code: mysql --user=root --password=password --database=test < EC_ACL_example_data_INSERT.sql ec_acl_demo.zip - this is ec_acl lib implemented in latest CI v2.1.2 framework. As prerequisite execute sample SQL and change configuration of {CI_Root}/application/config/database.php to match you DB. To see results call acl_demo controller: http://localhost/acl_demo. Any input / suggestion is very welcome !!! At least I'm only hobbyist developer passioned in PHP and Open Source. I don't want to spent many words about Codeigniter - great framework. Cheers !!!!
[eluser]somenet[/eluser]
Please post the complete example or detail use of the library.
[eluser]vukasin0[/eluser]
Hi somenet, I've updated lib for some details and add / extend examples in dropbox. If you still need more info - plz let me know which one. Cheers Vukasin
[eluser]Unknown[/eluser]
i'm trying, but i'm found error Quote:Fatal error: Class 'MY_Controller' not found so, how to solve ?? please, give me your code for views. Thanks
[eluser]vukasin0[/eluser]
Hi d4y4x, MY_Controller is custom class to extend CI_Controller and contain all the time accessing methods I use in program. Here is sample code: Code: <?php Thanks to point me to this - I'm going to create clean Codeigninter setup with this ACL in order to avoid situations like this one. Cheers, Vukasin
[eluser]vukasin0[/eluser]
Hi beardedlinuxgeek, In meantime I did some modifications so definitely I'll move to some source control system GitHub or GoogleCode. At the moment I'm short with time and expect that next week will be one to move/publish code. Cheers !!! |
Welcome Guest, Not a member yet? Register Sign In |