A role model can stay simple when it checks one grant against a small expected-permission list. The selector changes the role under review.

Program

Play the program to choose the role and inspect whether the grant is expected.

entitlement_status_model.dart
void main() {
  var role = ;
  var grant = 'deploy';
  var allowed = role == 'admin' ? ['deploy', 'read'] : ['read'];
  var auditStatus = allowed.contains(grant) ? 'expected' : 'unexpected';
  var line = '$role grant=$grant status=$auditStatus';
  print(line);
}
void main() {
  var role = ;
  var grant = 'deploy';
  var allowed = role == 'admin' ? ['deploy', 'read'] : ['read'];
  var auditStatus = allowed.contains(grant) ? 'expected' : 'unexpected';
  var line = '$role grant=$grant status=$auditStatus';
  print(line);
}
role selector `role` chooses which permission list is expected.
contains `allowed.contains(grant)` performs the membership check.
audit status The report labels the grant as expected or unexpected for the chosen role.