Revert "Oine external user login quick fix."
This reverts commit 37f7c86b3c.
This commit is contained in:
parent
181073b00f
commit
16b49b828c
@ -152,8 +152,7 @@ class Users extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function get($id, $includepermissions = 0)
|
public function get($id, $includepermissions = 0)
|
||||||
{
|
{
|
||||||
if (empty(DolibarrApiAccess::$user->rights->user->user->lire) && empty(DolibarrApiAccess::$user->admin) &&
|
if (empty(DolibarrApiAccess::$user->rights->user->user->lire) && empty(DolibarrApiAccess::$user->admin) && $id != 0 && DolibarrApiAccess::$user->id != $id) {
|
||||||
!(!empty(DolibarrApiAccess::$user->rights->user->self->creer) && (DolibarrApiAccess::$user->id == $id))) {
|
|
||||||
throw new RestException(401, 'Not allowed');
|
throw new RestException(401, 'Not allowed');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,7 +173,6 @@ class Users extends DolibarrApi
|
|||||||
$this->useraccount->getRights();
|
$this->useraccount->getRights();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->useraccount->societe_id = $this->useraccount->socid;
|
|
||||||
return $this->_cleanObjectDatas($this->useraccount);
|
return $this->_cleanObjectDatas($this->useraccount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,8 +294,6 @@ class Users extends DolibarrApi
|
|||||||
|
|
||||||
$this->useraccount->user_group_list = $this->_cleanUserGroupListDatas($userGroupList);
|
$this->useraccount->user_group_list = $this->_cleanUserGroupListDatas($userGroupList);
|
||||||
|
|
||||||
$this->useraccount->societe_id = $this->useraccount->socid;
|
|
||||||
//var_dump($this->useraccount); die();
|
|
||||||
return $this->_cleanObjectDatas($this->useraccount);
|
return $this->_cleanObjectDatas($this->useraccount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user