code: function setGrantsFor (permissionModel, roleId, resourceName, grants) {
    return permissionModel.upsert(
      {
        roleId: roleId,
        stateMachineName: resourceName,
        allows: grants
      },
      { }
    )
  }
docs: getGrantsFor