PluginProbe
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration / 2.0.15
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration v2.0.15
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 1.40 1.41 All 42 releases
fluent-boards / app / Http / Policies / PublicBoardPolicy.php

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

36 lines 900 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\App\Models\Board;
6 use FluentBoards\App\Services\PublicAccessService;
7 use FluentBoards\Framework\Http\Request\Request;
8
9 class PublicBoardPolicy extends BasePolicy
10 {
11 public function verifyRequest(Request $request)
12 {
13 if (strtoupper($request->getMethod()) !== 'GET') {
14 return false;
15 }
16
17 $boardId = absint($request->board_id);
18 if (!$boardId) {
19 return false;
20 }
21
22 $token = $request->getSafe('public_token', 'sanitize_text_field');
23 if (!PublicAccessService::validateAccessToken($boardId, $token)) {
24 return false;
25 }
26
27 $board = Board::where('id', $boardId)->whereNull('archived_at')->first();
28 if (!$board) {
29 return false;
30 }
31
32 return (bool)$board->getMetaByKey('public_access_enabled');
33 }
34 }
35
36