async validateAndSaveRole(role, options = {}) {
    await role.validateDefinition();

    if (role._id === "anonymous" && !role.canLogIn()) {
      throw kerror.get("security", "role", "login_required");
    }

    this.checkRoleNativeRights(role);
    this.checkRolePluginsRights(role, options);
    await this.persistToDatabase(role, options);

    const updatedRole = await this.loadOneFromDatabase(role._id);
    await this.roles.set(role._id, updatedRole);

    return updatedRole;
  }
Given a Role object, validates its definition and if OK, persist it to the database.

@param {Role} role
@param {object} [options] The persistence options
@returns Promise