PluginProbe
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration / 2.2.1
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration v2.2.1
2.2.1 2.2.0 2.1.0 2.0.15 2.0.12 2.0.10 2.0.4 2.0.1 2.0.0 1.95.3 1.95.2 1.95 1.91.6 trunk 1.11 1.12 1.13 1.20 1.21 1.22 1.23 1.30 1.31 1.32 1.35 All 44 releases
fluent-boards / app / Http / Policies / BoardManagerPolicy.php

BoardManagerPolicy.php in FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration 2.2.1, at app/Http/Policies/BoardManagerPolicy.php

28 lines 893 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentBoards\App\Http\Policies;
4
5 use FluentBoards\Framework\Http\Request\Request;
6 use FluentBoards\App\Services\PermissionManager;
7
8 class BoardManagerPolicy extends BasePolicy
9 {
10 /**
11 * Require management access to the route or report board; only admins may omit it.
12 * @param \FluentBoards\Framework\Http\Request\Request $request
13 * @return bool
14 */
15 public function verifyRequest(Request $request)
16 {
17 $routeParams = $request->get_url_params();
18
19 // Timesheet routes pass their board filter as an input, not a URL parameter.
20 $boardId = $routeParams['board_id'] ?? $request->get('board_id', 0);
21 $boardId = filter_var($boardId === '' ? 0 : $boardId, FILTER_VALIDATE_INT, [
22 'options' => ['min_range' => 0]
23 ]);
24
25 return $boardId !== false && PermissionManager::isBoardManager($boardId);
26 }
27 }
28