Hi,
This is the privateResources.php
<?php
use Phalcon\Config;
use Phalcon\Logger;
return new Config([
'privateResources' => [
'users' => [
'index',
'search',
'edit',
'create',
'delete',
'changePassword'
],
'profiles' => [
'index',
'search',
'edit',
'create',
'delete'
],
'permissions' => [
'index'
]
]
]);
This is my UsersController.php
public function indexAction(){
$this->assets
->collection("header")
->addCss('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css', false)
->addCss('https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css', false)
->addCss('https://fonts.googleapis.com/css?family=Josefin+Sans:400,300', false)
->addCss('css/style.css');
$this->assets
->collection("footer")
->addJs('js/modernizr.custom.70736.js')
->addJs('https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js', false)
->addJs('https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', false)
->addJs('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js', false)
->addJs('js/index.js');
}
index.volt
{{ assets.outputCss("header") }}
</head>
<body>
{{ content() }}
</body>
{{ assets.outputJs("footer") }}
Working
https://localhost/vokuro/index
After login
https://localhost/vokuro/users
Error
The collection does not exist in the manager
#0 [internal function]: Phalcon\Assets\Manager->get('header')
#1 C:\xampp7013\htdocs\vokuro\cache\volt\c__xampp7013_htdocs_vokuro_app_views_index.volt.php(6): Phalcon\Assets\Manager->outputCss('header')
#2 [internal function]: unknown()
#3 [internal function]: Phalcon\Mvc\View\Engine\Volt->render('C:\\xampp7013\\ht...', Array, true)
#4 [internal function]: Phalcon\Mvc\View->_engineRender(Array, 'index', true, true, NULL)
#5 [internal function]: Phalcon\Mvc\View->render('user_control', 'index', Array)
#6 C:\xampp7013\htdocs\vokuro\public\index.php(41): Phalcon\Mvc\Application->handle()
#7 {main}
When i comment the privateResources.php /users is working, but the ACL not.
Please need help
Rgds Stefan