This file handles the core permissions systems for SimpleDesk, including the permissions templates, loading and checking permissions.
This function stores the master list of permissions.
Provides a list of the known role/permission templates for the system.
Populates specific parameters in $user_info, mostly to add } abstract variables in $smcFunc['db_query'] data calls. The foremost one of these is {query_see_ticket}, an SQL clause constructed to ensure ticket visibility is maintained given the active user's permission set. Prior to 1.1 this was in Subs-SimpleDesk.php
All SimpleDesk-specific permissions should be checked with this function. Any other permission check that is not specifically SimpleDesk-related should use allowedTo instead. Prior to 1.0, this function was in Subs-SimpleDesk.php
Parameter: $permission
Expected type: mixed
A string or array of strings naming a permission or permissions that wish to be examined. Array format is only supported if $dept is not identical to false.
Parameter: $dept
Expected type: int|bool
Normally, the department number which the permission is considered for. Can also be 0 to indicate whether the user has that permission in any department, or false to indicate that it should return a list of all the departments where that permission is available.
All fatal-level SimpleDesk-specific permissions should be checked with this function. Any other permission check that is not specifically SimpleDesk-related should use isAllowedTo instead. Note that this is a void function because should this fail, SMF execution will be halted. Prior to 1.0, this function was in Subs-SimpleDesk.php
Parameter: $permission
Expected type: mixed
A string or array of strings naming a permission or permissions that wish to be examined.
Parameter: $dept
Expected type: int
A number indicating a department that the user must the permission in, or 0 for not caring which department provided the user has that permission in at least one department.
Currently lists of staff are generated by users who hold shd_staff permission. This function identifies those users through an internal lookup provided by SMF. Prior to 1.0, this function was in Subs-SimpleDesk.php
Parameter: $permission
Expected type: mixed
A string naming a permission that members should hold.
Parameter: $dept
Expected type: int
An integer indicating which department should be checked. If only confirmation that the user has the permission in at least one department without reference to any particular department, specify a department of 0.
Identifies which SMF membergroups hold a given permission.
Parameter: $permission
Expected type: string
A string naming a permission that members should hold.
Parameter: $dept
Expected type: int
An integer indicating which department should be checked. If only confirmation that the user has the permission in at least one department without reference to any particular department, specify a department of 0.
Page created in 0.017 seconds with 11 queries.