php - Enable access to module for unauthorized users in Yii's srbac -
i'm trying use hybridauth extension in yii. without srbac extension fine, problem need enable access module unauthorized users using it. i've tried setting property alwaysallowed stated in srbac guide:
the operations named [moduleid]/[subdirectory].[contollerid][action]
like this:
'alwaysallowed'=>array( //default: array() 'sitelogin','sitelogout','siteindex','siteadmin', 'siteerror', 'sitecontact','hybridauth@controllers.defaultlogin'),
(my delimiter @), doesn't work. i've been debugging , seems hybridauth controller (defaultcontroller) not recognized sbasecontroller in function _extendssbasecontroller (modules/srbac/controllers/authitemcontroller.php):
if ($cont instanceof sbasecontroller) { return true; }
my controller class extending sbasecontroller , works controllers not in module, not this. i've tried directly extend defaultcontroller sbasecontroller no luck.
how set module alwaysallowed?
i've added hybridauth@defaultindex
, hybridauth@defaultcallback
allways allowed list , works. construction of string can seen in srbac/controllers/sbasecontroller.php
in function beforeaction
:
$access = $mod . $controller . ucfirst($this->action->id);
Comments
Post a Comment