| Conditions | 4 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public static function admin_users_permissions_put ($Request) { |
||
| 38 | $user_id = $Request->route_ids(0); |
||
| 39 | $permissions = $Request->data('permissions'); |
||
|
|
|||
| 40 | if (!$user_id || !$permissions) { |
||
| 41 | throw new ExitException(400); |
||
| 42 | } |
||
| 43 | if (!User::instance()->set_permissions($permissions, $user_id)) { |
||
| 44 | throw new ExitException(500); |
||
| 45 | } |
||
| 48 |