| Conditions | 4 |
| Paths | 5 |
| Total Lines | 19 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function getRoleList($limit = true) |
||
| 15 | { |
||
| 16 | $roles = new UserRoleTypeCollection(UserRoleType::all()); |
||
| 17 | |||
| 18 | if($limit) |
||
| 19 | { |
||
| 20 | if(Auth::user()->role_id !== 1) |
||
| 21 | { |
||
| 22 | $roles->forget(0); |
||
|
|
|||
| 23 | } |
||
| 24 | |||
| 25 | //TOTO - Test this and make sure it is working |
||
| 26 | if(Auth::user()->role_id > 2) |
||
| 27 | { |
||
| 28 | $roles->forget(1); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | return $roles; |
||
| 33 | } |
||
| 35 |