Subversion Repositories SmartDukaan

Rev

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

Rev 16724 Rev 16729
Line 52... Line 52...
52
		$facebookConfig = Configure::read("Facebook");		
52
		$facebookConfig = Configure::read("Facebook");		
53
		$categories = Configure::read('Categories');
53
		$categories = Configure::read('Categories');
54
		if($this->params->params['controller'] == 'categories' || $this->params->params['controller'] == 'orders' ){
54
		if($this->params->params['controller'] == 'categories' || $this->params->params['controller'] == 'orders' ){
55
			//Check access for apps tab
55
			//Check access for apps tab
56
			$userId = $this->request->query('user_id');
56
			$userId = $this->request->query('user_id');
-
 
57
			if($this->isAuthorized()) {
-
 
58
				$userId = $this->Auth->user('id');
-
 
59
			}
57
			$cachekey = 'appacls-'.$userId;			
60
			$cachekey = 'appacls-'.$userId;			
58
			$access = Cache::read($cachekey,'day');
61
			$access = Cache::read($cachekey,'day');
59
			if(empty($access)) {
62
			if(empty($access)) {
60
				$this->loadModel('Appacl');
63
				$this->loadModel('Appacl');
61
				$this->Appacl->recursive = -1;
64
				$this->Appacl->recursive = -1;