isRestrictedAction static method

bool isRestrictedAction(
  1. String? action,
  2. Set<String> restrictedActions
)

Returns true if action is present in restrictedActions (case-insensitive).

Implementation

static bool isRestrictedAction(
  String? action,
  Set<String> restrictedActions,
) {
  if (action == null) return false;
  final normalized = action.toLowerCase();
  return restrictedActions.any((a) => a.toLowerCase() == normalized);
}