コード例 #1
0
 @GET
 @AnonymousAllowed
 @Path("option/set")
 public Response setOption(@QueryParam("key") String key, @QueryParam("value") boolean value) {
   applicationProperties.setOption(key, value);
   return Response.ok(null).build();
 }
コード例 #2
0
  @Test
  public void testGetLicenseExpiryStatusMessageForExpiredEvaluation() {
    mockLicense.setEvaluation(true);
    mockLicense.setExpiryDate(now);
    mockLicense.setExpired(true);

    applicationProperties.setOption(APKeys.JIRA_CONFIRMED_INSTALL_WITH_OLD_LICENSE, true);

    assertExpiryMessageContains("admin.license.expired");
  }
コード例 #3
0
  @Test
  public void testExternalUserManagementNoOsUser() throws Exception {
    applicationProperties.setOption(APKeys.JIRA_OPTION_USER_EXTERNALMGT, true);
    UpgradeTask_Build601 task = new MyUpgradeTask_Build601(null, false, applicationProperties);

    task.doUpgrade(false);
    Collection<String> errors = task.getErrors();

    assertEquals(1, errors.size());
    assertTrue(
        errors
            .iterator()
            .next()
            .contains(
                "JIRA is unable to migrate the User Directory configuration because external user management is enabled but the osuser.xml file is not available."));
  }
コード例 #4
0
 private void setLicenseExtenstionTimestamp(final long timestamp) {
   applicationProperties.setOption(APKeys.JIRA_CONFIRMED_INSTALL_WITH_OLD_LICENSE, true);
   applicationProperties.setString(
       APKeys.JIRA_CONFIRMED_INSTALL_WITH_OLD_LICENSE_TIMESTAMP, String.valueOf(timestamp));
 }