Function __global->check_delete_permission
Definitions
sources/permissions.php
- Check if a member has permission to delete a specific resource. If it doesn't, an error message is outputted.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $range | string | No | No | required parameter | low mid high cat_low cat_mid cat_high | N/A | The range of privilege we are checking to see if they have; these ranges are like trust levels |
| $resource_owner | ?MEMBER | No | No | required parameter | N/A | N/A | The member that owns this resource (null: no-one) |
| $cats | ?array | No | No | Null | N/A | N/A | A list of cat details to require access to (c-type-1,c-id-1,c-type-2,c-d-2,...) (null: N/A) |
| $page | ?ID_TEXT | No | No | Null | N/A | N/A | The page being checked (null: current page) |
Preview
Code (PHP)
/**
* Check if a member has permission to delete a specific resource. If it doesn't, an error message is outputted.
*
* @param string $range The range of privilege we are checking to see if they have; these ranges are like trust levels
* @set low mid high cat_low cat_mid cat_high
* @param ?MEMBER $resource_owner The member that owns this resource (null: no-one)
* @param ?array $cats A list of cat details to require access to (c-type-1,c-id-1,c-type-2,c-d-2,...) (null: N/A)
* @param ?ID_TEXT $page The page being checked (null: current page)
*/
function check_delete_permission(string $range, ?int $resource_owner, ?array $cats = null, ?string $page = null)
* Check if a member has permission to delete a specific resource. If it doesn't, an error message is outputted.
*
* @param string $range The range of privilege we are checking to see if they have; these ranges are like trust levels
* @set low mid high cat_low cat_mid cat_high
* @param ?MEMBER $resource_owner The member that owns this resource (null: no-one)
* @param ?array $cats A list of cat details to require access to (c-type-1,c-id-1,c-type-2,c-d-2,...) (null: N/A)
* @param ?ID_TEXT $page The page being checked (null: current page)
*/
function check_delete_permission(string $range, ?int $resource_owner, ?array $cats = null, ?string $page = null)

