Function __global->has_some_edit_comcode_page_permission
Definitions
sources/permissions.php
- Check to see if a member has permission to edit a Comcode page.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $scope | integer | No | No | required parameter | N/A | N/A | A bitmask of COMCODE_EDIT_* constants, identifying what kind of editing privilege we are looking for |
| $zone | ?ID_TEXT | No | No | Null | N/A | N/A | Zone to check for (null: check against global privileges, ignoring all per-zone overrides). Note how this is different to how a null zone works for checking add/bypass-validation privileges because if we get a false we have the get_comcode_page_editability_per_zone function to get more specific details, while for adding we either want a very specific or very vague answer. |
| $member_id | ?MEMBER | No | No | Null | N/A | N/A | The member being checked for access (null: current member) |
Returns
- If the permission is there
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Check to see if a member has permission to edit a Comcode page.
*
* @param integer $scope A bitmask of COMCODE_EDIT_* constants, identifying what kind of editing privilege we are looking for
* @param ?ID_TEXT $zone Zone to check for (null: check against global privileges, ignoring all per-zone overrides). Note how this is different to how a null zone works for checking add/bypass-validation privileges because if we get a false we have the get_comcode_page_editability_per_zone function to get more specific details, while for adding we either want a very specific or very vague answer.
* @param ?MEMBER $member_id The member being checked for access (null: current member)
* @return boolean If the permission is there
*/
function has_some_edit_comcode_page_permission(int $scope, ?string $zone = null, ?int $member_id = null) : bool
* Check to see if a member has permission to edit a Comcode page.
*
* @param integer $scope A bitmask of COMCODE_EDIT_* constants, identifying what kind of editing privilege we are looking for
* @param ?ID_TEXT $zone Zone to check for (null: check against global privileges, ignoring all per-zone overrides). Note how this is different to how a null zone works for checking add/bypass-validation privileges because if we get a false we have the get_comcode_page_editability_per_zone function to get more specific details, while for adding we either want a very specific or very vague answer.
* @param ?MEMBER $member_id The member being checked for access (null: current member)
* @return boolean If the permission is there
*/
function has_some_edit_comcode_page_permission(int $scope, ?string $zone = null, ?int $member_id = null) : bool

