AclController 0.1.0 - phpGACL enabled Controllers |
[eluser]Frank Berger[/eluser]
Hi Folks, I was working on this for the past few days, and I thought i am at a state where I can publish something and gather input: Package: AclController Version: 0.1.0 Author: Frank Berger <[email protected]> Url: http://www.taka-its.com/aclcontroller.0.1.0.zip Welcome to AclController to work with this Library, please make sure to read the INSTALL file in this directory and the documentation of gacl in order to enable your Controllers to grant or deny access based on an ACL, or to create your own acl's you have to start here: Lets assume you have Controller like this: Code: class Blog extends Controller { methods, while Index and Detail are accessible for everybody. To enable the Controller with ACL simply change the class-declaration to Code: class Blog extends AclController { thats all. From now on, all Methods have ACL's attached to it which can be managed for now through the phpgacl/admin interface. Please be sure to read the README file for lots more information, there are lots of config options already, including an optional authentication framework, automatic ARO and ACO creation, default ACL's , custom ACO rules and more. This implementation is free of any user management (besides a very basic one to demonstrate how it works, think .htpasswd). I am working in parallel on a Usermanagement implementation which will obsolete the need for phpGACL's own admin-tool, and incorporates Users, Groups and ACL's This library is designed to do the ACO setup automatically, and it will add ARO default settings to work with. Please check it out if you're looking for something like this (i know quite a few are) and any feedback is welcome. phpGACL Version 3.3.7 is packaged in the zip-file Cheers Frank
[eluser]vendiddy[/eluser]
Great idea! I'm gonna try to use this in my project.
[eluser]Frank Berger[/eluser]
wait for monday, i planned another release on the weekend. been working on it more, including documentation.
[eluser]phpserver[/eluser]
Thanks a lot Frank.I was writing my own acl class but it wasnt this good.Macro.
[eluser]NikhilSukul[/eluser]
Hi, After doing the installation . I just activated the controller by adding ACLController and i am getting this error, see below. Am i missed something? can you help me out A PHP Error was encountered Severity: Notice Message: Undefined property: Blog::$db Filename: libraries/Gacl.php Line Number: 146 A PHP Error was encountered Severity: Notice Message: Trying to get property of non-object Filename: libraries/Gacl.php Line Number: 146 A PHP Error was encountered Severity: Warning Message: mysql_insert_id() expects parameter 1 to be resource, null given Filename: drivers/adodb-mysql.inc.php Line Number: 218 A PHP Error was encountered Severity: Warning Message: mysql_insert_id() expects parameter 1 to be resource, null given Filename: drivers/adodb-mysql.inc.php Line Number: 218 A PHP Error was encountered Severity: Warning Message: mysql_insert_id() expects parameter 1 to be resource, null given Filename: drivers/adodb-mysql.inc.php Line Number: 218 A PHP Error was encountered Severity: Warning Message: mysql_insert_id() expects parameter 1 to be resource, null given Filename: drivers/adodb-mysql.inc.php Line Number: 218 A PHP Error was encountered Severity: Warning Message: mysql_insert_id() expects parameter 1 to be resource, null given Filename: drivers/adodb-mysql.inc.php Line Number: 218 An Error Was Encountered access on cntrl_blog not allowed for authuser
[eluser]Frank Berger[/eluser]
Hi what i can see is that the first error is like this: A PHP Error was encountered Severity: Notice Message: Undefined property: Blog::$db this indicates that the db connection from the Main-controller, which the ADODB layer gacl reuses, is missing (this is done to avoid 2 connections). Time permitting i want to post an update soon. I developed this further, including: - port of the gacl lib to native CI DB calls - an ACL Datamapper extention ( datamapper from stensi.com) - more features for handling the user and authentication - lots of bugfixes. Thanks for the interest, this helps me pushing forward Frank
[eluser]phpserver[/eluser]
Okay,after editing the database file in he .ini file,is there another database setting that is supposed to be taken care of?
[eluser]phpserver[/eluser]
Hey,i tried protecting welcome controller that is where i encountered the error to be exact.However i would like to know how gacl.php and aclcontroller.php can be edited as you have mentioned in the INSTALL file
[eluser]Frank Berger[/eluser]
the ini is only necessary if you want to use the admin-tool from phpgacl (which is independent of any codeigniter instance) there are 4 relevant files in config: database (obviously) needs to be configured aclcontroller.php - here you set how authentication works gacl.php - mirror your database settings here to be sure autoload - load database, gacl. aclcontroller is loaded via the MY_controller.php file (hen-egg problem) What errormessage do you get? Frank |
Welcome Guest, Not a member yet? Register Sign In |