Skip to content

Commit

Permalink
CSVを利用している際にログインができない不具合を改善 fixes #2805
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Jul 25, 2012
1 parent f870a2d commit 2f86599
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions baser/config/baser.php
Expand Up @@ -78,6 +78,7 @@
);
/**
* 認証プレフィックス設定
* ※ CSVは非対応
*/
$adminPrefix = Configure::read('Routing.admin');
$config['BcAuthPrefix'] = array(
Expand All @@ -96,13 +97,13 @@
'toolbar' => true
),
// フロント(例)
'front' => array(
/*'front' => array(
'name' => 'フロント',
'loginRedirect' => '/',
'userModel' => 'User',
'loginAction' => '/users/login',
'toolbar' => true
),
),*/
// マイページ(例)
/*'mypage' => array(
'name' => 'マイページ',
Expand Down
8 changes: 6 additions & 2 deletions baser/controllers/baser_app_controller.php
Expand Up @@ -262,10 +262,14 @@ function beforeFilter() {
$configs = Configure::read('BcAuthPrefix');
if(!empty($this->params['prefix']) && isset($configs[$this->params['prefix']])) {
$config = $configs[$this->params['prefix']];
$config['auth_prefix'] = $this->params['prefix'];
if(count($configs) >= 2) {
$config['auth_prefix'] = $this->params['prefix'];
}
}elseif(isset($configs['front'])) {
$config = $configs['front'];
$config['auth_prefix'] = 'front';
if(count($configs) >= 2) {
$config['auth_prefix'] = 'front';
}
} else {
$config = array();
}
Expand Down

0 comments on commit 2f86599

Please sign in to comment.