|
1 | 1 | <?php |
2 | 2 |
|
3 | | -/* |
4 | | - ------------------------------------------------------------------------- |
5 | | - LICENSE |
6 | | -
|
7 | | - This file is part of Transferticketentity plugin for GLPI. |
8 | | -
|
9 | | - Transferticketentity is free software: you can redistribute it and/or modify |
10 | | - it under the terms of the GNU Affero General Public License as published by |
11 | | - the Free Software Foundation, either version 3 of the License, or |
12 | | - (at your option) any later version. |
13 | | -
|
14 | | - Transferticketentity is distributed in the hope that it will be useful, |
15 | | - but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | | - GNU Affero General Public License for more details. |
18 | | -
|
19 | | - You should have received a copy of the GNU Affero General Public License |
20 | | - along with Reports. If not, see <http://www.gnu.org/licenses/>. |
21 | | -
|
22 | | - @category Ticket |
23 | | - @package Transferticketentity |
24 | | - @author Yannick Comba, Xavier Caillaud, Infotel |
25 | | - @copyright 2015-2026 Transferticketentity team |
26 | | - @license AGPL License 3.0 or (at your option) any later version |
27 | | - https://www.gnu.org/licenses/gpl-3.0.html |
28 | | - @link https://github.com/pluginsGLPI/transferticketentity/ |
29 | | - -------------------------------------------------------------------------- |
| 3 | +/** |
| 4 | + * ------------------------------------------------------------------------- |
| 5 | + * LICENSE |
| 6 | + * |
| 7 | + * This file is part of Transferticketentity plugin for GLPI. |
| 8 | + * |
| 9 | + * Transferticketentity is free software: you can redistribute it and/or modify |
| 10 | + * it under the terms of the GNU Affero General Public License as published by |
| 11 | + * the Free Software Foundation, either version 3 of the License, or |
| 12 | + * (at your option) any later version. |
| 13 | + * |
| 14 | + * Transferticketentity is distributed in the hope that it will be useful, |
| 15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | + * GNU Affero General Public License for more details. |
| 18 | + * |
| 19 | + * You should have received a copy of the GNU Affero General Public License |
| 20 | + * along with Reports. If not, see <http://www.gnu.org/licenses/>. |
| 21 | + * |
| 22 | + * @author Yannick Comba, Xavier Caillaud, Infotel |
| 23 | + * @category Ticket |
| 24 | + * @copyright 2015-2026 Transferticketentity team |
| 25 | + * @license AGPL License 3.0 or (at your option) any later version |
| 26 | + * @link https://github.com/pluginsGLPI/transferticketentity/ |
| 27 | + * @package Transferticketentity |
| 28 | + * https://www.gnu.org/licenses/gpl-3.0.html |
| 29 | + * -------------------------------------------------------------------------- |
30 | 30 | */ |
31 | 31 |
|
32 | 32 | use Glpi\Exception\Http\AccessDeniedHttpException; |
33 | 33 | use GlpiPlugin\Transferticketentity\Entity; |
34 | 34 | use GlpiPlugin\Transferticketentity\Ticket; |
35 | 35 |
|
36 | 36 | Session::checkRight('plugin_transferticketentity_use', READ); |
| 37 | +// This endpoint only feeds the transfer form, whose display and submission both |
| 38 | +// require `ticket` UPDATE (see Ticket::showFormMcv / launchTicketTransfer). Gate |
| 39 | +// the AJAX surface on the same capability so a profile holding only the plugin |
| 40 | +// READ right cannot enumerate target-entity groups and mandatory-policy flags. |
| 41 | +Session::checkRight('ticket', UPDATE); |
37 | 42 |
|
38 | 43 | if (strpos($_SERVER['PHP_SELF'], "showentitymandatoryjustification.php")) { |
39 | 44 | header("Content-Type: text/html; charset=UTF-8"); |
|
63 | 68 | echo "</span>"; |
64 | 69 | } |
65 | 70 | } |
66 | | - |
|
0 commit comments