# fluent-boards/2.1.0/app/Http/Policies/UserPolicy.php

FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration, version 2.1.0. 40 lines.

- Page: https://pluginprobe.com/plugins/fluent-boards/2.1.0/code/app/Http/Policies/UserPolicy.php
- Raw: https://pluginprobe.com/plugins/fluent-boards/2.1.0/raw/app/Http/Policies/UserPolicy.php
- Modified: 2026-09-09T13:50:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-boards/2.1.0/code/app/Http/Policies/UserPolicy.php#L10-L20`.

```php
<?php

namespace FluentBoards\App\Http\Policies;

use FluentBoards\App\Services\PermissionManager;
use FluentBoards\Framework\Http\Request\Request;

class UserPolicy extends BasePolicy
{

    /**
     * @param  Request  $request
     *
     * @return bool
     */
    public function verifyRequest(Request $request)
    {
        // Check if user has access to the app
        if (!PermissionManager::hasAppAccess()) {
            return false;
        }

        // Match the controller's URL target; query/body parameters must not override it.
        $routeParams = $request->get_url_params();
        if (!array_key_exists('id', $routeParams)) {
            return true;
        }

        $targetUserId = intval($routeParams['id']);

        return $targetUserId > 0 && PermissionManager::userCanAccessMemberProfile($targetUserId);
    }

    public function globalSearch(Request $request)
    {
        return true;
    }

}

```
