src/components/Auth.php
public function permissionVerify($type, $permissionWeight)
    {
        $numbers = [];
        
        switch ($type) {
            case self::CAN_CREATE:
                $numbers = [1, 4, 6, 9];
                break;
            case self::CAN_UPDATE:
                $numbers = [3, 4, 8, 9];
                break;
            case self::CAN_DELETE:
                $numbers = [5, 6, 8, 9];
                break;
        }

        return in_array($permissionWeight, $numbers);
    }
public function permissionVerify($type, $permissionWeight)
    {
        $numbers = [];
        
        switch ($type) {
            case self::CAN_CREATE:
                $numbers = [1, 4, 6, 9];
                break;
            case self::CAN_UPDATE:
                $numbers = [3, 4, 8, 9];
                break;
            case self::CAN_DELETE:
                $numbers = [5, 6, 8, 9];
                break;
        }

        return in_array($permissionWeight, $numbers);
    }
public function permissionVerify ( $ type , $ permissionWeight ) { $ numbers = [ ] ; switch ( $ type ) { case self :: CAN_CREATE : $ numbers = [ 1 , 4 , 6 , 9 ] ; break ; case self :: CAN_UPDATE : $ numbers = [ 3 , 4 , 8 , 9 ] ; break ; case self :: CAN_DELETE : $ numbers = [ 5 , 6 , 8 , 9 ] ; break ; } return in_array ( $ permissionWeight , $ numbers ) ; }
Verify a permission type against its calculated `weight`.

In order to calculate the permissions weight see {{\luya\admin\components\Auth::permissionWeight}}.

@param string $type The type of permission (1,2,3 see constants)
@param integer $permissionWeight A weight of the permssions which is value between 1 - 9, see [[app-admin-module-permission.md]].
@return boolean
Verify a permission type against its calculated weight .