18 private $appName =
'';
33 private $action = null;
38 private $acls = array();
45 $this->appName = $data[2];
46 $this->userId = $data[1];
48 for ($i = 3; $i < count($data); $i++) {
49 if (!empty($data[$i])) {
50 if ($data[$i][0] ==
'-') $this->acls[] = substr($data[$i], 1);
51 else $this->acls[] = $data[$i];
55 $this->action = $action;
56 $this->checkAppExists();
58 $this->checkUserExists();
59 $this->checkAclsExists();
65 private function checkAppExists()
67 if (!$this->appName) {
70 if ($this->checkSyntax($this->appName)) {
71 $this->appId = $this->action->parent->GetIdFromName($this->appName);
81 private function checkUserExists()
85 if (ctype_digit($this->userId)) {
91 $findUser = ($tu[
"us_whatid"] !=
'');
94 if ($findUser ===
false) {
101 private function checkAclsExists()
104 foreach ($this->acls as $acl) {
105 if ($this->checkSyntax($acl)) {
106 if (!$oAcl->Set($acl, $this->appId)) {
118 private function checkSyntax($acl)
120 if (preg_match(
"/^-?[A-Z_0-9_-]{1,63}$/i", $acl)) {
getTDoc($dbaccess, $id, $sqlfilters=array(), $result=array())
check(array $data, &$action=null)
static getError($code, $args=null)
Check application accesses when importing definition.
static getDisplayName($uid)