forked from analogrithems/idbroker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathidbroker_app_controller.php
More file actions
71 lines (66 loc) · 2.58 KB
/
idbroker_app_controller.php
File metadata and controls
71 lines (66 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/* SVN FILE: $Id: app_controller.php 7945 2008-12-19 02:16:01Z gwoo $ */
/**
* Short description for file.
*
* This file is application-wide controller file. You can put all
* application-wide controller-related methods here.
*
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
* @package cake
* @subpackage cake.app
* @since CakePHP(tm) v 0.2.9
* @version $Revision: 7945 $
* @modifiedby $LastChangedBy: gwoo $
* @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 2008) $
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
* Short description for class.
*
* Add your application-wide methods in the class below, your controllers
* will inherit them.
*
* @package cake
* @subpackage cake.app
*/
class IdbrokerAppController extends Controller {
var $helpers = array('Html','Javascript','Ajax');
var $components = array('RequestHandler', 'LDAPAuth', 'LDAPAcl', 'SettingsHandler'); // This should give ajax paginator support??
var $settings;
function initialize() {
$this->settings = $this->SettingsHandler->getSettings();
}
function beforeFilter() {
$this->LDAPAuth->allow('*');
$this->LDAPAuth->allowedActions = array('display');
//Configure LDAPAuthComponent
$this->LDAPAuth->actionPath = 'controllers/';
$this->LDAPAuth->authorize = 'actions';
$this->LDAPAuth->loginAction = array('controller' => 'LdapAuths', 'action' => 'login');
$this->LDAPAuth->logoutRedirect = array('controller' => 'LdapAuths', 'action' => 'login');
$this->LDAPAuth->loginError = "Invalid Username or Password";
$this->LDAPAuth->authError = "None shall pass! OK, actually you just don't have permission to go there";
}
function isAuthorized() {
return true;
}
function autoSet( $list ){
$nlist = array();
foreach( $list as $attr){
$nlist[$attr] = $this->SettingsHandler->autoSet($attr);
}
return($nlist);
}
}
?>