PluginProbe
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution / 2.5.0
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution v2.5.0
2.5.0 2.4.0 2.3.0 2.2.5 2.2.0 2.1.2 2.1.1 trunk 1.10.0 1.10.01 1.10.02 1.5.0 1.5.01 1.5.02 1.5.1 1.5.10 1.5.20 1.5.21 1.5.22 1.5.23 1.5.24 1.5.25 1.6.0 1.7.0 1.7.1 All 34 releases
← All changes | app/Services/Integrations/FluentBoards/Bootstrap.php +6 -0 2.2.5 → 2.5.0 View file →
@@ -9,8 +9,9 @@
9 9 use FluentBoards\App\Models\Board;
10 10 use FluentBoards\App\Models\User;
11 11 use FluentBoards\App\Services\Constant;
12 12 use FluentBoards\App\Services\NotificationService;
13 +use FluentBoards\App\Services\PermissionManager as FluentBoardsPermission;
13 14 use FluentBoards\App\Services\TaskService;
14 15 use FluentBooking\Framework\Support\Arr;
15 16 use FluentBooking\App\Http\Controllers\IntegrationManagerController;
16 17
@@ -241,8 +242,12 @@
241 242 public function getConfigFieldOptions($settings, $calendarEventId)
242 243 {
243 244 $boardId = Arr::get($settings, 'board_config.board_id');
244 245
246 + if ($boardId && !FluentBoardsPermission::userHasBoardPermission($boardId, 'GET')) {
247 + $boardId = null;
248 + }
249 +
245 250 $data = [
246 251 'board_id' => $this->getBoards(),
247 252 'stage_id' => $boardId ? $this->getStages($boardId) : [],
248 253 'label_ids' => $boardId ? $this->getBoardLabels($boardId) : [],
@@ -257,8 +262,9 @@
257 262
258 263 private function getBoards()
259 264 {
260 265 $boards = Board::whereNull('archived_at')
266 + ->whereIn('id', FluentBoardsPermission::getBoardIdsForUser())
261 267 ->select('id', 'title')
262 268 ->get();
263 269
264 270 $formattedBoards = $boards->mapWithKeys(function ($board) {