canRecursiveDelete method

Future<bool> canRecursiveDelete(
  1. String doctype
)

Check if the user can recursively delete a doctype.

The permission cache needs to be loaded. If not, false is returned.

Implementation

Future<bool> canRecursiveDelete(String doctype) async {
  final perms = doctypePerms[doctype];
  if (perms != null) return perms[0].recursiveDelete;
  config.logger.e('Renovation Core'
      'Permissions'
      'Permission Cache not loaded to retrieve correct perm for canRecursiveDelete');
  // no perms
  return false;
}