Files
urbackup/front/profile.form.php___
T
mariano 1dc84aa5eb Stable
2026-05-20 09:20:27 +02:00

41 lines
906 B
Plaintext

<?php
/**
* -------------------------------------------------------------------------
* UrBackup plugin for GLPI
* -------------------------------------------------------------------------
*/
use GlpiPlugin\Urbackup\Profile;
include('../../../inc/includes.php');
Session::checkLoginUser();
Session::checkRight('profile', UPDATE);
Session::checkCSRF($_POST);
$profiles_id = (int) ($_POST['profiles_id'] ?? 0);
if ($profiles_id <= 0) {
Session::addMessageAfterRedirect(
__('Invalid profile.', 'urbackup'),
true,
ERROR
);
Html::back();
}
if (isset($_POST['update_urbackup_rights'])) {
Profile::saveRights($_POST);
Session::addMessageAfterRedirect(
__('UrBackup rights saved successfully.', 'urbackup'),
true,
INFO
);
}
global $CFG_GLPI;
Html::redirect($CFG_GLPI['root_doc'] . '/front/profile.form.php?id=' . $profiles_id);