|
|
@@ -9,6 +9,7 @@ class Schema_UserProcessStorageAcl extends Core_AclSimpleSchemaBase {
|
|
|
'root' => [
|
|
|
'@namespace' => 'default_objects/UserProcess',
|
|
|
'ID' => [ '@type' => 'xsd:integer' ],
|
|
|
+ 'PARENT_ID' => [ '@type' => 'xsd:integer' ],
|
|
|
'nazwa' => [ '@type' => 'xsd:string', '@alias' => 'DESC' ],
|
|
|
'opis' => [ '@type' => 'xsd:string', '@alias' => 'OPIS' ],
|
|
|
'link_uruchom_filtr_procesu' => [ '@type' => 'p5:www_link' ],
|
|
|
@@ -19,6 +20,15 @@ class Schema_UserProcessStorageAcl extends Core_AclSimpleSchemaBase {
|
|
|
]
|
|
|
];
|
|
|
public $_rootTableName = 'CRM_PROCES';
|
|
|
+ public $idUser = null;
|
|
|
+
|
|
|
+ public function __construct($simpleSchema = null) {
|
|
|
+ parent::__construct($simpleSchema);
|
|
|
+ $this->idUser = User::getID();// default - current user
|
|
|
+ }
|
|
|
+
|
|
|
+ public function setIdUser($idUser) { $this->idUser = intval($idUser); }
|
|
|
+ public function getIdUser() { return $this->idUser; }
|
|
|
|
|
|
public function getTotal($params = []) {
|
|
|
$sqlWhereAnd = $this->_parseSqlWhere($params);
|
|
|
@@ -81,6 +91,7 @@ class Schema_UserProcessStorageAcl extends Core_AclSimpleSchemaBase {
|
|
|
|
|
|
$items = DB::getPDO()->fetchAllByKey("
|
|
|
select p.ID
|
|
|
+ , p.PARENT_ID
|
|
|
, p.`DESC` as nazwa
|
|
|
, p.`OPIS` as opis
|
|
|
, p.A_RECORD_CREATE_AUTHOR as `autor`
|
|
|
@@ -107,7 +118,6 @@ class Schema_UserProcessStorageAcl extends Core_AclSimpleSchemaBase {
|
|
|
}
|
|
|
|
|
|
public function _getUserIdGroupList() {
|
|
|
- $idUser = User::getID();
|
|
|
return array_map(
|
|
|
function ($row) {
|
|
|
return $row['ID'];
|
|
|
@@ -117,7 +127,7 @@ class Schema_UserProcessStorageAcl extends Core_AclSimpleSchemaBase {
|
|
|
from `CRM_AUTH_PROFILE` as up
|
|
|
left join `CRM_LISTA_ZASOBOW` as z on(z.`ID`=up.`ID_ZASOB`)
|
|
|
where
|
|
|
- up.`REMOTE_ID`='{$idUser}'
|
|
|
+ up.`REMOTE_ID`='{$this->idUser}'
|
|
|
and up.`A_STATUS` in('WAITING', 'NORMAL')
|
|
|
and up.`REMOTE_TABLE`='ADMIN_USERS'
|
|
|
and z.`ID` is not null
|