Procedural File: access_api.php
Source Location: /core/access_api.php
Page Details:
Access Api
Tags:
Includes:
array $g_cache_access_matrix [line 64]
array $g_cache_access_matrix_project_ids [line 70]
array $g_cache_access_matrix_user_ids [line 76]
access_can_close_bug [line 502]
bool access_can_close_bug(
int $p_bug_id, [int|null $p_user_id = null])
|
|
Check if the current user can close the specified bug
Tags:
Parameters
int |
$p_bug_id |
integer representing bug id to check access against |
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
access_can_reopen_bug [line 539]
bool access_can_reopen_bug(
int $p_bug_id, [int|null $p_user_id = null])
|
|
Check if the current user can reopen the specified bug
Tags:
Parameters
int |
$p_bug_id |
integer representing bug id to check access against |
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
access_compare_level [line 204]
bool access_compare_level(
int $p_user_access_level, [int|array $p_threshold = NOBODY])
|
|
Check the a user's access against the given "threshold" and return true if the user can access, false otherwise. $p_access_level may be a single value, or an array. If it is a single value, treat it as a threshold so return true if user is >= threshold. If it is an array, look for exact matches to one of the values
Tags:
Parameters
int |
$p_user_access_level |
user access level |
int|array |
$p_threshold |
access threshold, defaults to NOBODY |
access_denied [line 83]
Function to be called when a user is attempting to access a page that he/she is not authorised to. This outputs an access denied message then re-directs to the mainpage.
access_ensure_bugnote_level [line 489]
void access_ensure_bugnote_level(
int $p_access_level, int $p_bugnote_id, [int|null $p_user_id = null])
|
|
Check if the user has the specified access level for the given bugnote and deny access to the page if not
Tags:
Parameters
int |
$p_access_level |
integer representing access level |
int |
$p_bugnote_id |
integer representing bugnote id to check access against |
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
access_ensure_bug_level [line 447]
bool access_ensure_bug_level(
int $p_access_level, int $p_bug_id, [int|null $p_user_id = null])
|
|
Check if the user has the specified access level for the given bug and deny access to the page if not
Tags:
Parameters
int |
$p_access_level |
integer representing access level |
int |
$p_bug_id |
integer representing bug id to check access against |
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
access_ensure_can_close_bug [line 526]
void access_ensure_can_close_bug(
int $p_bug_id, [int|null $p_user_id = null])
|
|
Make sure that the current user can close the specified bug
Tags:
Parameters
int |
$p_bug_id |
integer representing bug id to check access against |
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
access_ensure_can_reopen_bug [line 560]
void access_ensure_can_reopen_bug(
int $p_bug_id, [int|null $p_user_id = null])
|
|
Make sure that the current user can reopen the specified bug. Calls access_denied if user has no access to terminate script
Tags:
Parameters
int |
$p_bug_id |
integer representing bug id to check access against |
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
access_ensure_global_level [line 265]
void access_ensure_global_level(
int $p_access_level, [int|null $p_user_id = null])
|
|
Check if the user has the specified global access level and deny access to the page if not
Tags:
Parameters
int |
$p_access_level |
integer representing access level |
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
access_ensure_project_level [line 362]
void access_ensure_project_level(
int $p_access_level, [int|null $p_project_id = null], [int|null $p_user_id = null])
|
|
Check if the user has the specified access level for the given project and deny access to the page if not
Tags:
Parameters
int |
$p_access_level |
integer representing access level |
int|null |
$p_project_id |
integer representing project id to check access against, defaults to null to use current project |
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
access_get_global_level [line 219]
int access_get_global_level(
[int|null $p_user_id = null])
|
|
This function only checks the user's global access level, ignoring any overrides they might have at a project level
Tags:
Parameters
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
access_get_local_level [line 574]
bool|int access_get_local_level(
int $p_user_id, int $p_project_id)
|
|
get the user's access level specific to this project. return false (0) if the user has no access override here
Tags:
Parameters
int |
$p_user_id |
Integer representing user id |
int |
$p_project_id |
integer representing project id |
access_get_project_level [line 280]
int access_get_project_level(
[int $p_project_id = null], [int|null $p_user_id = null])
|
|
This function checks the project access level first (for the current project if none is specified) and if the user is not listed, it falls back on the user's global access level.
Tags:
Parameters
int |
$p_project_id |
integer representing project id to check access against |
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
access_get_status_threshold [line 606]
int access_get_status_threshold(
int $p_status, [int $p_project_id = ALL_PROJECTS])
|
|
get the access level required to change the issue to the new status If there is no specific differentiated access level, use the generic update_bug_status_threshold.
Tags:
Parameters
int |
$p_status |
|
int |
$p_project_id |
Default value ALL_PROJECTS |
access_has_any_project [line 375]
bool access_has_any_project(
int $p_access_level, [int|null $p_user_id = null])
|
|
Check whether the user has the specified access level for any project project
Tags:
Parameters
int |
$p_access_level |
integer representing access level |
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
access_has_bugnote_level [line 464]
bool access_has_bugnote_level(
int $p_access_level, int $p_bugnote_id, [int|null $p_user_id = null])
|
|
Check the current user's access against the given value and return true if the user's access is equal to or higher, false otherwise. This function looks up the bugnote's bug and performs an access check against that bug
Tags:
Parameters
int |
$p_access_level |
integer representing access level |
int |
$p_bugnote_id |
integer representing bugnote id to check access against |
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
access_has_bug_level [line 407]
bool access_has_bug_level(
int $p_access_level, int $p_bug_id, [int|null $p_user_id = null])
|
|
Check the current user's access against the given value and return true if the user's access is equal to or higher, false otherwise. This function looks up the bug's project and performs an access check against that project
Tags:
Parameters
int |
$p_access_level |
integer representing access level |
int |
$p_bug_id |
integer representing bug id to check access against |
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
access_has_global_level [line 242]
bool access_has_global_level(
int $p_access_level, [int|null $p_user_id = null])
|
|
Check the current user's access against the given value and return true if the user's access is equal to or higher, false otherwise.
Tags:
Parameters
int |
$p_access_level |
integer representing access level |
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
access_has_project_level [line 335]
bool access_has_project_level(
int $p_access_level, [int $p_project_id = null], [int|null $p_user_id = null])
|
|
Check the current user's access against the given value and return true if the user's access is equal to or higher, false otherwise.
Tags:
Parameters
int |
$p_access_level |
integer representing access level |
int |
$p_project_id |
integer representing project id to check access against |
int|null |
$p_user_id |
integer representing user id, defaults to null to use current user |
|
|