@@ 173-182 (lines=10) @@ | ||
170 | * @return array |
|
171 | * @throws \Micro\Base\Exception |
|
172 | */ |
|
173 | protected function rolePerms($role) |
|
174 | { |
|
175 | $query = new Query($this->db); |
|
176 | $query->select = '*'; |
|
177 | $query->table = 'acl_role_perm'; |
|
178 | $query->addWhere('role='.$role); |
|
179 | $query->single = false; |
|
180 | ||
181 | return $query->run(); |
|
182 | } |
|
183 | ||
184 | /** |
|
185 | * Assign role permission |
@@ 94-103 (lines=10) @@ | ||
91 | * @return mixed |
|
92 | * @throws \Micro\Base\Exception |
|
93 | */ |
|
94 | public function assigned($userId) |
|
95 | { |
|
96 | $query = new Query($this->db); |
|
97 | $query->select = '*'; |
|
98 | $query->table = 'acl_user'; |
|
99 | $query->addWhere('`user`='.$userId); |
|
100 | $query->single = false; |
|
101 | ||
102 | return $query->run(); |
|
103 | } |
|
104 | ||
105 | /** |
|
106 | * Get permissions in role |