<<

NAME

ProductOpener::Permissions - defines user permissions and provide a has_permission function to check them

DESCRIPTION

is_admin_or_moderator ($request_ref)

Check if the user is an admin or moderator.

has_permission_product_revert ($request_ref)

Check if the user has permission to revert a product.

True for moderators, admins, and logged in users of the pro platform.

has_permission ($request_ref, $permission)

Check if the user has a specific permission.

Parameters

$request_ref (input)

Reference to the request object.

$permission (input)

Permission to check.

Return value

1 if the user has the permission, 0 otherwise.

<<