Subversion Repositories SmartDukaan

Rev

Rev 14929 | Rev 14992 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14929 Rev 14970
Line 14... Line 14...
14
 
14
 
15
	public $limit;
15
	public $limit;
16
	public $apihost;
16
	public $apihost;
17
 
17
 
18
	public $components = array(
18
	public $components = array(
19
		'Session','Resize',
19
		'Session','Resize','Cookie',
20
		'Auth' => array(
20
		'Auth' => array(
21
			'loginAction' => array('controller' => 'users', 'action' => 'login'),
21
			'loginAction' => array('controller' => 'users', 'action' => 'login'),
22
			'allowedActions' => array('index', 'view', 'display')
22
			'allowedActions' => array('index', 'view', 'display')
23
		)			
23
		)			
24
	);
24
	);
Line 70... Line 70...
70
		$this->apihost = Configure::read('pythonapihost');
70
		$this->apihost = Configure::read('pythonapihost');
71
		$this->limit = Configure::read('dealsperpage');	
71
		$this->limit = Configure::read('dealsperpage');	
72
		$staticVersion = Configure::read('staticversion');
72
		$staticVersion = Configure::read('staticversion');
73
		$this->set('staticversion',$staticVersion);
73
		$this->set('staticversion',$staticVersion);
74
		$this->set('requiremobileverification',Configure::read('requiremobileverification'));			
74
		$this->set('requiremobileverification',Configure::read('requiremobileverification'));			
-
 
75
		$debugusers = Configure::read('debugusers');
-
 
76
		if($id = $this->isAuthorized()){
-
 
77
			if(in_array($id, $debugusers)){
-
 
78
				$this->Cookie->write('debuguser',1);
-
 
79
			}else{
-
 
80
				$this->Cookie->delete('debuguser');
-
 
81
			}
-
 
82
		}
75
    }
83
    }
76
	
84
	
77
    function isAuthorized() {
85
    function isAuthorized() {
78
        return $this->Auth->user('id');
86
        return $this->Auth->user('id');
79
    }
87
    }