canAmend method

Future<bool> canAmend(
  1. String doctype
)

Check if the user can amend a doctype.

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

Implementation

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