Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-22261

Fix logic around config. variable 'nuxeo.user.registration.force.validation.non.existing'

    XMLWordPrintable

    Details

      Description

      When configuration variable nuxeo.user.registration.force.validation.non.existing is set to true, it does not seem to force the validation.
      Check in platform & addon nuxeo-platform-user-registration's code.

      RegistrationRules#allowDirectValidationForNonExistingUser being the method to get the value of configuration variable nuxeo.user.registration.force.validation.non.existing, here is the code in UserInvitationComponent#submitRegistrationRequest that determines if the invitation validation must be forced:

              RegistrationRules registrationRules = getRegistrationRules(configurationName);
              boolean byPassAdminValidation = autoAccept;
              byPassAdminValidation |= userAlreadyExists && registrationRules.allowDirectValidationForExistingUser();
              byPassAdminValidation |= registrationRules.allowDirectValidationForExistingUser()
                      && registrationRules.allowDirectValidationForNonExistingUser();
              if (byPassAdminValidation) {
                  // Build validationBaseUrl with nuxeo.url property as request is not
                  // accessible.
                  if (!additionnalInfo.containsKey("enterPasswordUrl")) {
                      additionnalInfo.put("enterPasswordUrl", buildEnterPasswordUrl(currentConfig));
                  }
      

      if the goal of configuration variable nuxeo.user.registration.force.validation.non.existing is to force the invitation validation, it does not show in the code.

      FYI The default value returned by RegistrationRules#allowDirectValidationForExistingUser is false.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day
                1d

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.