See Release Notes
Long Term Support Release
Differences Between: [Versions 400 and 401] [Versions 401 and 402] [Versions 401 and 403]
(no description)
File Size: | 306 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
audience:: (9 methods):
get_base_records()
get_allowed_reports()
purge_caches()
user_reports_list_sql()
user_reports_list()
user_reports_list_access_sql()
user_audience_sql()
get_audience_types()
get_all_audiences_menu_types()
for:: (0 methods):
get_base_records(int $reportid) X-Ref |
Return audience instances for a given report. Note that any records pointing to invalid audience types will be excluded param: int $reportid return: base[] |
get_allowed_reports(?int $userid = null) X-Ref |
Returns list of report IDs that the specified user can access, based on audience configuration. This can be expensive if the site has lots of reports, with lots of audiences, so we cache the result for the duration of the users session param: int|null $userid User ID to check, or the current user if omitted return: int[] |
purge_caches() X-Ref |
Purge the audience cache of allowed reports |
user_reports_list_sql(string $reporttablealias, ?int $userid = null) X-Ref |
Generate SQL select clause and params for selecting reports specified user can access, based on audience configuration param: string $reporttablealias param: int|null $userid User ID to check, or the current user if omitted return: array |
user_reports_list(?int $userid = null) X-Ref |
Return list of report ID's specified user can access, based on audience configuration param: int|null $userid User ID to check, or the current user if omitted return: int[] |
user_reports_list_access_sql(string $reporttablealias,?int $userid = null,?context $context = null) X-Ref |
Returns SQL to limit the list of reports to those that the given user has access to - A user with 'editall' capability will have access to all reports - A user with 'edit' capability will have access to: - Those reports this user has created - Those reports this user is in audience of - A user with 'view' capability will have access to: - Those reports this user is in audience of param: string $reporttablealias param: int|null $userid User ID to check, or the current user if omitted param: context|null $context return: array |
user_audience_sql(array $audiences, string $usertablealias = 'u') X-Ref |
Return appropriate list of where clauses and params for given audiences param: audience_model[] $audiences param: string $usertablealias return: array[] [$wheres, $params] |
get_audience_types() X-Ref |
Returns the list of audiences types in the system. return: array |
get_all_audiences_menu_types() X-Ref |
Get all the audiences types the current user can add to, organised by categories. return: array |