Admin Locations

4 permissions in this category

admin.locations.create

Create new locations

ADMIN_LOCATIONS_CREATE

admin.locations.delete

Delete locations

ADMIN_LOCATIONS_DELETE

admin.locations.edit

Edit existing locations

ADMIN_LOCATIONS_EDIT

admin.locations.view

View locations

ADMIN_LOCATIONS_VIEW

Usage in Code

How to check permissions in your code

PHP Backend

use App\Helpers\PermissionHelper;

// Check if user has permission
if (PermissionHelper::hasPermission($userUuid, 'admin.locations.create')) {
    // User has permission
}

Using Permission Constants

use App\Permissions;

// Use constant instead of string
if (PermissionHelper::hasPermission($userUuid, Permissions::ADMIN_LOCATIONS_CREATE)) {
    // User has permission
}