| @@ 759-761 (lines=3) @@ | ||
| 756 | return false; |
|
| 757 | } |
|
| 758 | ||
| 759 | if (!empty($this->managerOptions['options']['access']['apps']) && !in_array(\App::$cur->name, $this->managerOptions['options']['access']['apps'])) { |
|
| 760 | return false; |
|
| 761 | } |
|
| 762 | if (!empty($this->managerOptions['options']['access']['groups'])) { |
|
| 763 | return in_array(\Users\User::$cur->group_id, $this->managerOptions['options']['access']['groups']); |
|
| 764 | } |
|
| @@ 762-764 (lines=3) @@ | ||
| 759 | if (!empty($this->managerOptions['options']['access']['apps']) && !in_array(\App::$cur->name, $this->managerOptions['options']['access']['apps'])) { |
|
| 760 | return false; |
|
| 761 | } |
|
| 762 | if (!empty($this->managerOptions['options']['access']['groups'])) { |
|
| 763 | return in_array(\Users\User::$cur->group_id, $this->managerOptions['options']['access']['groups']); |
|
| 764 | } |
|
| 765 | if ($this->managerName == 'manager' && !\Users\User::$cur->isAdmin()) { |
|
| 766 | return false; |
|
| 767 | } |
|
| @@ 335-337 (lines=3) @@ | ||
| 332 | if (!empty($this->form['options']['access']['apps']) && !in_array(\App::$cur->name, $this->form['options']['access']['apps'])) { |
|
| 333 | return false; |
|
| 334 | } |
|
| 335 | if (!empty($this->form['options']['access']['groups']) && in_array(\Users\User::$cur->group_id, $this->form['options']['access']['groups'])) { |
|
| 336 | return true; |
|
| 337 | } |
|
| 338 | if ($this->model && !empty($this->form['options']['access']['self']) && \Users\User::$cur->id == $this->model->user_id) { |
|
| 339 | return true; |
|
| 340 | } |
|