| Total Complexity | 1 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class ServerPermissionHelper |
||
| 8 | { |
||
| 9 | const CONTROL_ABILITY = 'server-control'; |
||
| 10 | const START_ABILITY = 'server-start'; |
||
| 11 | const STOP_ABILITY = 'server-stop'; |
||
| 12 | const RESTART_ABILITY = 'server-restart'; |
||
| 13 | const UPDATE_ABILITY = 'server-update'; |
||
| 14 | const CONSOLE_VIEW_ABILITY = 'server-console-view'; |
||
| 15 | const CONSOLE_SEND_ABILITY = 'server-console-send'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var array All game server permission |
||
| 19 | */ |
||
| 20 | private static $allServersPermissions = [ |
||
| 21 | 'game-server-common', |
||
| 22 | 'game-server-start', |
||
| 23 | 'game-server-stop', |
||
| 24 | 'game-server-restart', |
||
| 25 | 'game-server-pause', |
||
| 26 | 'game-server-update', |
||
| 27 | 'game-server-files', |
||
| 28 | 'game-server-tasks', |
||
| 29 | 'game-server-settings', |
||
| 30 | |||
| 31 | // Console |
||
| 32 | 'game-server-console-view', |
||
| 33 | 'game-server-console-send', |
||
| 34 | 6 | ||
| 35 | // RCON |
||
| 36 | 6 | 'game-server-rcon-console', |
|
| 37 | 'game-server-rcon-players', |
||
| 38 | ]; |
||
| 39 | |||
| 40 | public static function getAllPermissions() |
||
| 45 |