public function hasPermissionTo($permission): bool
    {
        // Check role flags
        if ($this->hasPermissionFlags()) {
            return $this->hasPermissionThroughFlag();
        }

        // Check role permissions
        if ($this->hasPermissionThroughRole($permission)) {
            return true;
        }

        // Check user permission
        if ($this->hasPermission($permission)) {
            return true;
        }

        return false;
    }
public function hasPermissionTo($permission): bool
    {
        // Check role flags
        if ($this->hasPermissionFlags()) {
            return $this->hasPermissionThroughFlag();
        }

        // Check role permissions
        if ($this->hasPermissionThroughRole($permission)) {
            return true;
        }

        // Check user permission
        if ($this->hasPermission($permission)) {
            return true;
        }

        return false;
    }
public function hasPermissionTo ( $ permission ) : bool { // Check role flags if ( $ this -> hasPermissionFlags ( ) ) { return $ this -> hasPermissionThroughFlag ( ) ; } // Check role permissions if ( $ this -> hasPermissionThroughRole ( $ permission ) ) { return true ; } // Check user permission if ( $ this -> hasPermission ( $ permission ) ) { return true ; } return false ; }
The mothergoose check. Runs through each scenario provided
by Shinobi - checking for special flags, role permissions, and
individual user permissions; in that order.

@param  Permission  $permission
@return boolean
The mothergoose check . Runs through each scenario provided by Shinobi - checking for special flags role permissions and individual user permissions ; in that order .