Merge pull request #1084 from itflow-org/budget-perms

Budget - CSRF + Perms
This commit is contained in:
Johnny
2024-10-03 16:52:28 -04:00
committed by GitHub
2 changed files with 14 additions and 0 deletions

View File

@@ -5,6 +5,11 @@
*/
if (isset($_POST['save_budget'])) {
enforceUserPermission('module_financial', 2);
validateCSRFToken($_POST['csrf_token']);
$budgets = $_POST['budget'];
$year = intval($_POST['year']);
@@ -37,6 +42,11 @@ if (isset($_POST['save_budget'])) {
}
if (isset($_POST['delete_budget'])) {
enforceUserPermission('module_financial', 3);
validateCSRFToken($_POST['csrf_token']);
$year = intval($_POST['year']);
mysqli_query($mysqli,"DELETE FROM budget WHERE budget_year = $year");