Skip to content
Snippets Groups Projects
Commit d7387979 authored by srosse's avatar srosse
Browse files

OO-1958: save setting if "start page" is clicked too

parent cb5e6a9a
No related branches found
No related tags found
No related merge requests found
......@@ -99,7 +99,8 @@ public class ResumeController extends FormBasicController {
if(source.equals(noButton)){
savePreferences(ureq, "none");
fireEvent (ureq, new Event("no"));
} else if(source.equals(landingButton)){
} else if(source.equals(landingButton)){
savePreferences(ureq, "none");
fireEvent (ureq, new Event("landing"));
}
}
......
......@@ -36,6 +36,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
......@@ -197,10 +198,22 @@ public class SecurityManagerTest extends OlatTestCase {
assertEquals(testLogin,authentication.getAuthusername());
}
@Test public void testFindAuthenticationByAuthusername() {
@Test
public void testFindAuthenticationByAuthusername() {
Authentication authentication = securityManager.findAuthenticationByAuthusername(testLogin, BaseSecurityModule.getDefaultAuthProviderIdentifier());
assertEquals(testLogin,authentication.getAuthusername());
}
@Test
public void testFindAuthenticationByAuthusername_attack() {
String testLoginHacked = "*est-logi*";
Authentication authentication1 = securityManager.findAuthenticationByAuthusername(testLoginHacked, BaseSecurityModule.getDefaultAuthProviderIdentifier());
Assert.assertNull(authentication1);
String testLoginHacked2 = "$est-login";
Authentication authentication2 = securityManager.findAuthenticationByAuthusername(testLoginHacked2, BaseSecurityModule.getDefaultAuthProviderIdentifier());
Assert.assertNull(authentication2);
}
@Test @Ignore
public void testCountUniqueUserLoginsSince(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment