# HG changeset patch
# User Evgeniy.Koshkin@unit-519.Labs.IntelliJ.Net
# Date 1463400236 -10800
# Node ID d9cb6eec6f741f6420d7572483ba074e1334b911
# Parent d15927dab809b61e06bdbdc705fd99f8405cfda5
fix compilation
(grafted from 16bb993f3c73b2764e6530c84069d9d33564278d)
diff -r d15927dab809 -r d9cb6eec6f74 .idea/misc.xml
--- a/.idea/misc.xml Mon May 16 14:49:19 2016 +0300
+++ b/.idea/misc.xml Mon May 16 15:03:56 2016 +0300
@@ -27,8 +27,7 @@
http://www.w3.org/1999/xhtml
-
+
-
-
+
\ No newline at end of file
diff -r d15927dab809 -r d9cb6eec6f74 server-tests/server-tests.iml
--- a/server-tests/server-tests.iml Mon May 16 14:49:19 2016 +0300
+++ b/server-tests/server-tests.iml Mon May 16 15:03:56 2016 +0300
@@ -8,10 +8,11 @@
+
+
-
diff -r d15927dab809 -r d9cb6eec6f74 server-tests/src/jetbrains/buildServer/symbols/DownloadSymbolsControllerTest.java
--- a/server-tests/src/jetbrains/buildServer/symbols/DownloadSymbolsControllerTest.java Mon May 16 14:49:19 2016 +0300
+++ b/server-tests/src/jetbrains/buildServer/symbols/DownloadSymbolsControllerTest.java Mon May 16 15:03:56 2016 +0300
@@ -41,13 +41,13 @@
public void setUp() throws Exception {
myBuildMetadataStorage = new MetadataStorageMock();
super.setUp();
- myFixture.getServerSettings().setGuestLoginAllowed(true);
+ myFixture.getLoginConfiguration().setGuestLoginAllowed(true);
}
@Override
protected BaseController createController() throws IOException {
AuthorizationInterceptor authInterceptor = myFixture.getSingletonService(AuthorizationInterceptor.class);
- AuthHelper authHelper = new AuthHelper(myFixture.getServerSettings(), myFixture.getUserModel(), myFixture.getSingletonService(HttpAuthenticationManager.class));
+ AuthHelper authHelper = new AuthHelper(myFixture.getLoginConfiguration(), myFixture.getUserModel(), myFixture.getSingletonService(HttpAuthenticationManager.class));
return new DownloadSymbolsController(myServer, myWebManager, authInterceptor, myFixture.getSecurityContext(), myBuildMetadataStorage, authHelper);
}
@@ -89,7 +89,7 @@
@Test
public void request_pdb_unauthorized() throws Exception {
- myFixture.getServerSettings().setGuestLoginAllowed(false);
+ myFixture.getLoginConfiguration().setGuestLoginAllowed(false);
myRequest.setRequestURI("mock", getRegisterPdbUrl("secur32.pdb", "8EF4E863187C45E78F4632152CC82FEB"));
doGet();
assertEquals(HttpStatus.SC_UNAUTHORIZED, myResponse.getStatus());
diff -r d15927dab809 -r d9cb6eec6f74 server/src/jetbrains/buildServer/symbols/AuthHelper.java
--- a/server/src/jetbrains/buildServer/symbols/AuthHelper.java Mon May 16 14:49:19 2016 +0300
+++ b/server/src/jetbrains/buildServer/symbols/AuthHelper.java Mon May 16 15:03:56 2016 +0300
@@ -2,8 +2,8 @@
import jetbrains.buildServer.controllers.interceptors.auth.HttpAuthenticationManager;
import jetbrains.buildServer.controllers.interceptors.auth.HttpAuthenticationResult;
+import jetbrains.buildServer.serverSide.auth.LoginConfiguration;
import jetbrains.buildServer.serverSide.auth.ServerPrincipal;
-import jetbrains.buildServer.serverSide.ServerSettings;
import jetbrains.buildServer.users.SUser;
import jetbrains.buildServer.users.UserModel;
import jetbrains.buildServer.util.Predicate;
@@ -22,14 +22,14 @@
private static final Logger LOG = Logger.getLogger(AuthHelper.class);
- @NotNull private final ServerSettings myServerSettings;
+ @NotNull private final LoginConfiguration myLoginConfiguration;
@NotNull private final UserModel myUserModel;
@NotNull private final HttpAuthenticationManager myAuthManager;
- public AuthHelper(@NotNull ServerSettings serverSettings,
+ public AuthHelper(@NotNull LoginConfiguration loginConfiguration,
@NotNull UserModel userModel,
@NotNull HttpAuthenticationManager authManager) {
- myServerSettings = serverSettings;
+ myLoginConfiguration = loginConfiguration;
myUserModel = userModel;
myAuthManager = authManager;
}
@@ -38,7 +38,7 @@
public SUser getAuthenticatedUser(@NotNull HttpServletRequest request,
@NotNull HttpServletResponse response,
@NotNull Predicate hasPermissions) throws IOException {
- if(myServerSettings.isGuestLoginAllowed()) {
+ if(myLoginConfiguration.isGuestLoginAllowed()) {
LOG.debug("Guest access enabled on the server. Trying to check permissions of Guest.");
final SUser guestUser = myUserModel.getGuestUser();
if (hasPermissions.apply(guestUser)) {