* Check key when integrate with ranzhi.

This commit is contained in:
daitingting
2016-05-24 10:21:01 +08:00
parent 3b829cbc2e
commit 2a6ec86f01
3 changed files with 6 additions and 1 deletions
+1
View File
@@ -170,6 +170,7 @@ class commonModel extends model
if($module == 'sso' and $method == 'gettodolist') return true;
if($module == 'product' and $method == 'showerrornone') return true;
if($module == 'block' and $method == 'printblock') return true;
if($module == 'block' and $method == 'main') return true;
if($this->loadModel('user')->isLogon())
{
+4
View File
@@ -192,6 +192,7 @@ class sso extends control
*/
public function getUserPairs()
{
if(!$this->sso->checkKey()) return false;
$users = $this->loadModel('user')->getPairs('noclosed,nodeleted');
die(json_encode($users));
}
@@ -204,6 +205,7 @@ class sso extends control
*/
public function getBindUsers()
{
if(!$this->sso->checkKey()) return false;
$users = $this->sso->getBindUsers();
die(json_encode($users));
}
@@ -250,6 +252,8 @@ class sso extends control
*/
public function getTodoList($account = '')
{
if(!$this->sso->checkKey()) return false;
$datas = array();
$datas['task'] = $this->dao->select("id, name")->from(TABLE_TASK)->where('assignedTo')->eq($account)->andWhere('status')->in('wait,doing')->fetchPairs();
$datas['bug'] = $this->dao->select("id, title")->from(TABLE_BUG)->where('assignedTo')->eq($account)->andWhere('status')->eq('active')->fetchPairs();
+1 -1
View File
@@ -660,7 +660,7 @@ class user extends control
if($this->post->account) $account = $this->post->account;
if($this->get->account) $account = $this->get->account;
if($this->post->password) $password = $this->post->password;
if($this->get->password) $password = $this->get->password;
if($this->get->password) $password = base64_decode($this->get->password);
if($this->user->checkLocked($account))
{