Improved the validation logic of permissions criteria