Skip to content

Commit fb7112d

Browse files
committed
Add SetupComponent
1 parent 07e83b6 commit fb7112d

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/**
3+
* Copyright 2010 - 2018, Cake Development Corporation (https://www.cakedc.com)
4+
*
5+
* Licensed under The MIT License
6+
* Redistributions of files must retain the above copyright notice.
7+
*
8+
* @copyright Copyright 2010 - 2017, Cake Development Corporation (https://www.cakedc.com)
9+
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
10+
*/
11+
12+
namespace CakeDC\Users\Controller\Component;
13+
14+
15+
use Cake\Controller\Component;
16+
17+
class SetupComponent extends Component
18+
{
19+
/**
20+
* @param array $config
21+
* @throws \Exception
22+
*/
23+
public function initialize(array $config)
24+
{
25+
parent::initialize($config);
26+
$this->getController()->loadComponent('CakeDC/Users.UsersAuth');
27+
$this->getController()->Auth->deny();
28+
$this->getController()->Auth->allow(['display', 'login']);
29+
}
30+
}

0 commit comments

Comments
 (0)