src/Security/Permission.php
public static function check($code, $arg = "any", $member = null, $strict = true)
    {
        if (!$member) {
            if (!Security::getCurrentUser()) {
                return false;
            }
            $member = Security::getCurrentUser();
        }

        return self::checkMember($member, $code, $arg, $strict);
    }
public static function check($code, $arg = "any", $member = null, $strict = true)
    {
        if (!$member) {
            if (!Security::getCurrentUser()) {
                return false;
            }
            $member = Security::getCurrentUser();
        }

        return self::checkMember($member, $code, $arg, $strict);
    }
public static function check ( $ code , $ arg = "any" , $ member = null , $ strict = true ) { if ( ! $ member ) { if ( ! Security :: getCurrentUser ( ) ) { return false ; } $ member = Security :: getCurrentUser ( ) ; } return self :: checkMember ( $ member , $ code , $ arg , $ strict ) ; }
Check that the current member has the given permission.

@param string|array $code Code of the permission to check (case-sensitive)
@param string $arg Optional argument (e.g. a permissions for a specific page)
@param int|Member $member Optional member instance or ID. If set to NULL, the permssion
will be checked for the current user
@param bool $strict Use "strict" checking (which means a permission
will be granted if the key does not exist at all)?
@return int|bool The ID of the permission record if the permission
exists; FALSE otherwise. If "strict" checking is
disabled, TRUE will be returned if the permission does not exist at all.
Check that the current member has the given permission .