Function isAllowedTo
Fatal error if they cannot. Uses allowedTo() to check if the user is allowed to do permission. Checks the passed boards or current board for the permission. If $any is true, the user only needs permission on at least one of the boards to pass If they are not, it loads the Errors language file and shows an error using $txt['cannot_' . $permission]. If they are a guest and cannot do it, this calls is_not_guest().
Package: SMF
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Security.php
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Security.php
string|array |
$permission |
A single permission to check or an array of permissions to check |
integer|array |
$boards = null |
The ID of a single board or an array of board IDs if we're checking board-level permissions (null otherwise) |
boolean |
$any = false |
Whether to check for permission on at least one board instead of all boards |