Re: Access Control Manager (ACM) Plugin Now Available!
Cake Access Control Manager * Home * Users Groups * Managed Controllers * Permissions CakePHP : Rapid Development Framework Controller dump: AcmController Object ( [name] = Acm [uses] = Array ( [0] = AcmUser [1] = AcmRole [2] = AcmPrivilege ) [components] = Array ( [0] = Acl [1] = Session ) [helpers] = Array ( [0] = Html [1] = Ajax [2] = Javascript [3] = Acm ) [layout] = cpanel [autoRender] = [aroTree] = Array ( ) [roleModel] = AcmRole [userModel] = AcmUser [here] = /mariposa/acm/acm [action] = index [viewPath] = acm [_viewVars] = Array ( ) [pageTitle] = [modelNames] = Array ( [0] = AcmUser [1] = AcmRole [2] = AcmPrivilege ) [base] = /mariposa/acm [autoLayout] = 1 [beforeFilter] = [view] = View [_viewClass] = View Object ( [name] = Acm [here] = /mariposa/acm/acm [parent] = [action] = index [uses] = [helpers] = Array ( [0] = Html [1] = Ajax [2] = Javascript [3] = Acm ) [viewPath] = acm [_viewVars] = Array ( ) [pageTitle] = [models] = Array ( ) [base] = /mariposa/acm [layout] = cpanel [autoRender] = [autoLayout] = 1 [params] = Array ( [controller] = acm [action] = index [url] = Array ( [url] = acm ) [bare] = 0 [webservices] = ) [hasRendered] = [controller] = AcmController Object *RECURSION* [loaded] = Array ( [html] = HtmlHelper Object ( [base] = /mariposa/acm [here] = /mariposa/acm/acm [params] = Array ( [controller] = acm [action] = index [url] = Array ( [url] = acm ) [bare] = 0 [webservices] = ) [action] = index [data] = [model] = [field] = [_crumbs] = Array ( ) [tags] = Array ( [link] = %s [mailto] = %s [form] = [input] = [textarea] = %s [hidden] = [checkbox] = [radio] = %s [selectstart] = [password] = [file] = [submit] = [image] = [tableheader] = %s [tableheaderrow] = %s [tablecell] = %s [tablerow] = %s [css] = [charset] = [javascriptblock] = [javascriptlink] = ) [_log] = [webroot] = /mariposa/ [themeWeb] = [plugin] = acm ) [ajax] = AjaxHelper Object ( [helpers] = Array ( [0] = Html [1] = Javascript ) [callbacks] = Array ( [0] = uninitialized [1] = loading [2] = loaded [3] = interactive [4] = complete ) [ajaxOptions] = Array ( [0] = type [1] = confirm [2] = condition [3] = before [4] = after [5] = fallback [6] = update [7] = loading [8] = loaded [9] = interactive [10] = complete [11] = with [12] = url [13] = method [14] = position [15] = form [16] = parameters [17] = evalScripts [18] = asynchronous [19] = onComplete [20] = onUninitialized [21] = onLoading [22] = onLoaded [23] = onInteractive [24] = insertion ) [dragOptions] = Array ( [0] = handle [1] = revert [2] = constraint [3] = change ) [dropOptions] = Array ( [0] = accept [1] = containment [2] = overlap [3] = greedy [4] = hoverclass [5] = onHover [6] = onDrop ) [sortOptions] = Array ( [0] = tag [1] = only [2] = overlap [3] = constraint [4] = containment [5] = handle [6] = hoverClass [7] = ghosting [8] = dropOnEmpty [9] = onUpdate [10] = onChange ) [sliderOptions] = Array ( [0] = axis [1] = increment [2] = maximum [3] = minimum [4] = alignX [5] = alignY [6] = sliderValue [7] = disabled [8] = handleImage [9] = handleDisabled [10] = values [11] = onSlide [12] = onChange ) [editorOptions] = Array ( [0] = okText [1] =
Re: Access Control Manager (ACM) Plugin Now Available!
Hi there: I've downloaded the ACM plugin and can see it by going to http://mysite/acm - however, I'm getting some errors even though I'm pretty sure I have my database set up right. For instance, I get: SQL Error in model Aro: 1054: Unknown column ' lft' in 'order clause' Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\cake\app\plugins\acm\controllers\acm_controller.php on line 63 SQL Error in model Aco: 1054: Unknown column ' lft' in 'order clause' Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\cake\app\plugins\acm\controllers\acm_controller.php on line 80 when I go to the Permissions page. When I go to Managed Controllers I get: Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\cake\app\plugins\acm\views\acm\privileges.thtml on line 4 And when I go to Users Groups I get: SQL Error in model Aro: 1054: Unknown column ' lft' in 'order clause' Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\cake\app\plugins\acm\views\acm\privileges.thtml on line 4 I created my database tables by looking at the fields listed in the cake\scripts\acl.php file and the column 'lft' does exist in both the aros and acos tables, so I'm not sure what the issue is. I'm able to AutoLoad users with no problems. Anyhow, if this is something I screwed up, sorry to bother you :) Tracy rpeterson wrote: Hey Everyone! ACM Plugin is now ready to rock! We currently released version 0.10.0.4 pending bug fixes to version 1.0. The project can be found at: http://cakeforge.org/projects/acm/ . What is ACM? ACM is a simple web-interface will plug into your exisitng CakePHP application by simply droping it into the plugin directory. Alowing you to easily manage your ACL Permissions. Note: Thie project was origonal called ACL Admin, since then we have decided to rename it and open it as a whole new project. I am usualy on irc if you have any questions. ~rpeterson **Many thanks to gwoo for all his help on geting this project available** --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
Tracy, The best place I would be able to help you is if you could jump on the irc channel #CakePHP , but if not I will attempt to assist you in getting ACM running. I am really excited to get it as easy to install and setup as possible. First, what version of Cake are you using? Just so I have a record of what install people are having issues with. Have you loaded any controllers into the system yet? I may need to make some adjustments on the order by lft query to see if ACO or AROS exist. I will get back to you with more information once I have lookied into it a little further. ~rpeterson --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
Hi Ryan, I'm running cake_1.0.1.2708 I'm not sure why my plugins dir wouldn't be readable by my webserver, it's below the site root and I'm pretty sure everything gets permission masked upon creation and upload. open_basedir certainly has access to it if that's what you mean? Maybe I can take a peek at the documentation in the source if it's on the index page ;) Thanks much for your help (and for putting this together in the first place). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
calzone, I just realized I was working with cake 0.1 so I am working on fixing it up to make sure it all works with 1.0 Ryan Hi Ryan, I'm running cake_1.0.1.2708 I'm not sure why my plugins dir wouldn't be readable by my webserver, it's below the site root and I'm pretty sure everything gets permission masked upon creation and upload. open_basedir certainly has access to it if that's what you mean? Maybe I can take a peek at the documentation in the source if it's on the index page ;) Thanks much for your help (and for putting this together in the first place). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
I would jump on IRC if I weren't at work :) Ports blocked and all that. I just downloaded cake from the cakephp.org website today, so I'm guessing I'm running the most recent - 1.0.1.2708. I created an empty user and permission model because the first errors were looking for models for those 2 tables (i have a permissions table rather than a roles table). Those are the only files I have in addition to the ACM folder in plugins. Now, I'm not sure if this would affect anything, but I'm running cake from a subdirectory rather than the documentroot. I can change this to test if you like. Thanks, Tracy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
Hi, TracyB wrote: I've downloaded the ACM plugin and can see it by going to http://mysite/acm - however, I'm getting some errors even though I'm pretty sure I have my database set up right. Yes, that's a problem that git introduces with the 1.0 release. SQL Error in model Aro: 1054: Unknown column ' lft' in 'order clause' See http://groups.google.com/group/cake-php/browse_frm/thread/67ffb6436c20804d for a solution - if there's no database given, CakePHP inserts a blank in fornt of the fieldname (inside the backticks). I created my database tables by looking at the fields listed in the cake\scripts\acl.php file and the column 'lft' does exist in both the aros and acos tables, so I'm not sure what the issue is. Your database is probably correct, that has to be changes in the ACM plugin. Regards, Dominik. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
TracyB, I found some issues, I just realized I was still running 0.1 of cake so I am working on getting some bugs worked out of it here with 1.0 and will get it updated as soon as I get it all working. Ryan I would jump on IRC if I weren't at work :) Ports blocked and all that. I just downloaded cake from the cakephp.org website today, so I'm guessing I'm running the most recent - 1.0.1.2708. I created an empty user and permission model because the first errors were looking for models for those 2 tables (i have a permissions table rather than a roles table). Those are the only files I have in addition to the ACM folder in plugins. Now, I'm not sure if this would affect anything, but I'm running cake from a subdirectory rather than the documentroot. I can change this to test if you like. Thanks, Tracy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
Ryan :) There may be a lot of us because cake 1.x just got dugg this week and I think there's been a massive newbie influx. Thanks for your patience and persistence. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
Thanks for the swift fix :) I'm getting another issue now though - I deleted the old installation and have no files except the new ACM in plugins, and user.php and permission.php (empty models) in the models directory. When I try to go to http://mysite/acm, I get: Fatal error: Call to a member function write() on a non-object in C:\xampp\htdocs\cake\app\plugins\acm\config.php on line 23 It seems to have a problem with: $this-Session-write('ACM.AutoLoad',false); If I knew more PHP I'd just try to fix it myself, but I come from an ASP(ick) background. Tracy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
Hey All! Ok, I uploaded a new release ACM 0.10.0.7 that will work with CakePHP 1.0, also added Install instuctions in docs and in the notes of the release. See the change log for what was done. Let me know if you have other issues. ~rpeterson --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
TracyB, done by cake ~rpeterson Is there something that has to be done to initialize the session? or is that done automatically by cake? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
TracyB, At the risk of coming across as a complete moron, I need to ask: how did you know to set up user.php and permission.php, how did you know what to put inside, and how did you know what to do with config.php? I'm totally in the dark. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
I'm making progress. I actually got a usable UI to appear at mysite.com/acm It had some errors about missing tables, and then missing fields. I took wild guesses that the missing fields should be varchar 32 to see what would happen. Once I stopped getting errors, I tried adding the code below to posts_controller.php (this is the blog tutorial controller). But now I'm getting a php error: Fatal error: Call to undefined function: _checkaccess() in /var/www/vhosts/chriskausel.com/httpdocs/app/controllers/posts_controller.php on line 12 And here's the code, lifted straight from the documentation. I'm not sure if I was supposed to change anything or not. var $components = array('Acl'); var $beforeFilter = array('checkAcl'); function checkAcl() { $aco = $this-name . : . $this-action; if($this-_checkAccess($this-Session-read('User.username'), $aco)) { return; } else { //Not Allowed Action } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
calzone, Yes as I note in the doc, I didn't test that script it was just a sample. Here is the same script actually implemented into an app of mine. This is put in the app_controller.php or your App. You will have to set the session information to whatever you use for your user authentication. Ryan var $components = array('Acl'); var $beforeFilter = array('checkAdmin'); function checkAdmin() { $aco = $this-name . : . $this-action; if($this-Session-read('User.logged') === true) { if($this-_checkAccess($this-Session-read('User.username'), $aco)) { return; } else { $this-redirect('/admin/users/login/'); } }else{ if($this-_checkAccess('User', $aco)) { return; } else { $this-redirect('/admin/users/login/'); } } } function _checkAccess($aro, $aco) { // Check access using the component: $access = $this-Acl-check($aro, $aco, $action = *); //access denied if ($access === false) { return false; } //access allowed else { return true; } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Access Control Manager (ACM) Plugin Now Available!
care to explain how to get this working? there seems to be zero documentation at cakeforge or in the download. the closest I got was a lucky guess to go to mysite.com/acm at which point I got: Warning: loadplugincontroller(/var/www/vhosts/mysite.com/httpdocs/app/plugins/acm/acm_app_controller.php): failed to open stream: Permission denied in /var/www/vhosts/mysite.com/httpdocs/cake/basics.php on line 303 Fatal error: loadplugincontroller(): Failed opening required '/var/www/vhosts/mysite.com/httpdocs/app/plugins/acm/acm_app_controller.php' (include_path='.:/usr/share/pear:/var/www/vhosts/mysite.com/httpdocs:/var/www/vhosts/mysite.com/httpdocs/app/') in /var/www/vhosts/mysite.com/httpdocs/cake/basics.php on line 303 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---