增加了可视化模块的浏览权限判断

This commit is contained in:
Li Jianxuan 2012-06-19 09:55:52 +00:00
parent 95dfa9917a
commit 002eb8aded
1 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,14 @@ class VisualController extends Zend_Controller_Action
$this->view->config = Zend_Registry::get('config');
$this->db=Zend_Registry::get('db');
$this->dbh = new PDO("pgsql:dbname=qinghaihu;host=localhost", "gis", "gispassword" );
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
$this->uid = $user->id;
}else{
$this->_redirect('/account/login?href=/data/visual');
}
}
function indexAction()