Skip to Content.
Sympa Menu

comanage-dev - Re: [comanage-dev] error after logging in

Subject: COmanage Developers List

List archive

Re: [comanage-dev] error after logging in


Chronological Thread 
  • From: Benn Oshrin <>
  • To: Scott Koranda <>
  • Cc:
  • Subject: Re: [comanage-dev] error after logging in
  • Date: Tue, 14 Feb 2012 18:04:19 -0500

Interesting... I wonder how that slipped through. I don't think there's a JIRA for this... can you create one and put a link to the documentation that says array('Controller') in a comment before resolving and committing?

Thanks,

-Benn-

On 2/14/12 2:50 PM, Scott Koranda wrote:
Hi,

In the file

app/Controller/AppController.php

I changed the line

// Tell the Auth module to call the controller's isAuthorized() function.
$this->Auth->authorize = 'controller';

to instead be

// Tell the Auth module to call the controller's isAuthorized() function.
$this->Auth->authorize = array('Controller');

I believe this is a necessary CakePHP 2.0.x change.

After this change the registry works as expected.

May I commit this change?

Scott


Right, but auth has succeeded and you're back to PagesController,
which has an isAuthorized() method, so I'm not sure what's going on
here.

You can try adding the following to UsersController:

function isAuthorized() {
// Construct the permission set for this user, which will also
be passed to the view.
$p = array();

// Determine what operations this user can perform

// Login?
$p['login'] = true;

// Logout
$p['logout'] = true;

$this->set('permissions', $p);
return($p[$this->action]);
}

This fixed a similar problem I was having, but not at
PagesController (thus, I modified UsersController), so I don't think
it's going to do anything for you.

-Benn-

On 2/10/12 8:49 AM, Scott Koranda wrote:
On 2/9/12 11:46 PM, Scott Koranda wrote:
500 Internal Server Error

This is likely Apache related.

I do not believe so. Recall that the browser is delivered this
content with the 500 Internal Server Error (along with the
COmanage logo):

Authorization adapter&quot;controller&quot; was not found.

Error: An Internal Error Has Occurred.
Stack Trace

#0
/home/skoranda/CodeRepositories/COmanage/registry/trunk/lib/Cake/Controller/Component/AuthComponent.php(376):
AuthComponent->constructAuthorize()
#1
/home/skoranda/CodeRepositories/COmanage/registry/trunk/lib/Cake/Controller/Component/AuthComponent.php(330):
AuthComponent->isAuthorized(Array)
#2 [internal function]: AuthComponent->startup(Object(PagesController))
#3
/home/skoranda/CodeRepositories/COmanage/registry/trunk/lib/Cake/Utility/ObjectCollection.php(104):
call_user_func_array(Array, Array)
#4
/home/skoranda/CodeRepositories/COmanage/registry/trunk/lib/Cake/Controller/Controller.php(606):
ObjectCollection->trigger('startup', Array)
#5
/home/skoranda/CodeRepositories/COmanage/registry/trunk/lib/Cake/Routing/Dispatcher.php(101):
Controller->startupProcess()
#6
/home/skoranda/CodeRepositories/COmanage/registry/trunk/lib/Cake/Routing/Dispatcher.php(86):
Dispatcher->_invoke(Object(PagesController), Object(CakeRequest),
Object(CakeResponse))
#7
/home/skoranda/CodeRepositories/COmanage/registry/trunk/app/webroot/index.php(96):
Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#8 {main}

That is clearly a CakePHP stack trace.

What's in your httpd logs?


No errors or warnings are reported:

garlic:/etc/apache2/sites-enabled# grep error /var/log/apache2/error.log
garlic:/etc/apache2/sites-enabled#
garlic:/etc/apache2/sites-enabled# grep warn /var/log/apache2/error.log
garlic:/etc/apache2/sites-enabled#

Scott





Archive powered by MHonArc 2.6.16.

Top of Page