Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/RegisterAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_admin/src/java/org/lamsfoundation/lams/admin/web/RegisterAction.java,v
diff -u -r1.9 -r1.9.4.1
--- lams_admin/src/java/org/lamsfoundation/lams/admin/web/RegisterAction.java 28 Jan 2009 00:05:11 -0000 1.9
+++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/RegisterAction.java 23 Apr 2009 06:41:18 -0000 1.9.4.1
@@ -78,7 +78,7 @@
public class RegisterAction extends LamsDispatchAction {
private static final Logger log = Logger.getLogger(RegisterAction.class);
- private static final String LAMS_COMMUNITY_REGISTER_URL = "http://lamscommunity.org/x/registration";
+ private static final String LAMS_COMMUNITY_REGISTER_URL = "http://lamscommunity.org/lams/x/registration";
public static final String LAMS_COMMUNITY_KEY = "17^76iTkqYSywJ73";
private static IUserManagementService userManagementService;
Index: lams_central/src/java/org/lamsfoundation/lams/authoring/web/ImportToolContentAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/authoring/web/ImportToolContentAction.java,v
diff -u -r1.11 -r1.11.4.1
--- lams_central/src/java/org/lamsfoundation/lams/authoring/web/ImportToolContentAction.java 30 Jan 2009 05:11:02 -0000 1.11
+++ lams_central/src/java/org/lamsfoundation/lams/authoring/web/ImportToolContentAction.java 23 Apr 2009 06:41:42 -0000 1.11.4.1
@@ -117,6 +117,7 @@
//String learningDesignLocation = WebUtil.readStrParam(request, PARAM_LEARNING_DESIGN_LOCATION);
String learningDesignLocation = "http://lamscommunity.org/lams/x/downloads?seq_id=712445";
+
importLDFromURL(request, learningDesignLocation, customCSV);
return mapping.findForward("successLC");
} else {
@@ -226,18 +227,19 @@
String fileName = FileUtil.generateUniqueContentFolderID() + ".zip";
try {
-
- // append the lams community auth info
- learningDesignLocation = LamsCommunityUtil.appendAuthInfoToURL(learningDesignLocation);
-
- Integer workspaceFolderUid = null;
-
//get shared session
HttpSession ss = SessionManager.getSession();
//get back login user DTO
UserDTO userDto = (UserDTO) ss.getAttribute(AttributeNames.USER);
User user = (User) getUserService().findById(User.class, userDto.getUserID());
+
+ // append the lams community auth info
+ learningDesignLocation = LamsCommunityUtil.appendAuthInfoToURL(learningDesignLocation, user);
+ Integer workspaceFolderUid = null;
+
+
+
File designFile = null;
String uploadPath = FileUtil.createTempDirectory("_uploaded_learningdesign") + File.separator
+ FileUtil.getFileName(fileName);
Index: lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java,v
diff -u -r1.49 -r1.49.4.1
--- lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java 26 Feb 2009 19:20:10 -0000 1.49
+++ lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java 23 Apr 2009 06:41:42 -0000 1.49.4.1
@@ -118,6 +118,9 @@
} else if (StringUtils.equals(tab, "lessons")) {
return mapping.findForward("lessons");
} else if (StringUtils.equals(tab, "community")) {
+
+ String comLoginUrl = Configuration.get(ConfigurationKeys.SERVER_URL) + "/lamsCommunityLogin.do";
+ request.setAttribute("comLoginUrl", comLoginUrl);
request.setAttribute("tab", tab);
return mapping.findForward("community");
}
@@ -152,8 +155,10 @@
headerLinks.add(new IndexLinkBean("index.author", "javascript:openAuthor()"));
}
headerLinks.add(new IndexLinkBean("index.myprofile", "index.do?tab=profile"));
-
- if (Configuration.getAsBoolean(ConfigurationKeys.LAMS_COMMUNITY_ENABLE)) {
+
+
+ Registration reg = Configuration.getRegistration();
+ if (reg != null) {
if (request.isUserInRole(Role.SYSADMIN) || request.isUserInRole(Role.GROUP_ADMIN)
|| request.isUserInRole(Role.GROUP_MANAGER) || request.isUserInRole(Role.AUTHOR)
|| request.isUserInRole(Role.AUTHOR_ADMIN) || request.isUserInRole(Role.MONITOR)) {
Index: lams_central/src/java/org/lamsfoundation/lams/web/lamscommunity/LamsCommunityLoginAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/lamscommunity/LamsCommunityLoginAction.java,v
diff -u -r1.2 -r1.2.4.1
--- lams_central/src/java/org/lamsfoundation/lams/web/lamscommunity/LamsCommunityLoginAction.java 30 Jan 2009 05:11:02 -0000 1.2
+++ lams_central/src/java/org/lamsfoundation/lams/web/lamscommunity/LamsCommunityLoginAction.java 23 Apr 2009 06:41:43 -0000 1.2.4.1
@@ -241,21 +241,14 @@
HttpSession sharedsession = SessionManager.getSession();
sharedsession.setAttribute(AttributeNames.USER, userDTO);
-
String timestamp = "" + new Date().getTime();
String hash = LamsCommunityUtil.createAuthenticationHash(timestamp, user.getLamsCommunityUsername(), user.getLamsCommunityToken(), serverID, serverKey);
// Redirect the user to the lamscommunity sso url
String url = LamsCommunityUtil.LAMS_COMMUNITY_SSO_URL + "?";
- url = LamsCommunityUtil.appendAuthInfoToURL(url);
+ url = LamsCommunityUtil.appendAuthInfoToURL(url, user);
- //String url = LamsCommunityUtil.LAMS_COMMUNITY_SSO_URL + "?";
- //url += LamsCommunityUtil.PARAM_LC_USERNAME + "=" + URLEncoder.encode(user.getLamsCommunityUsername(), "UTF8");
- //url += "&" + LamsCommunityUtil.PARAM_HASH + "=" + hash;
- //url += "&" + LamsCommunityUtil.PARAM_SERVER_ID + "=" + serverID;
- //url += "&" + LamsCommunityUtil.PARAM_TIMESTAMP + "=" + timestamp;
-
if (lamscommunityDest != null)
{
String customCSV = WebUtil.readStrParam(request, AttributeNames.PARAM_CUSTOM_CSV, true);
@@ -266,7 +259,7 @@
response.sendRedirect(url);
return null;
- }
+ }
private String appendReturnUrl(String url, String dest, String customCSV) throws Exception
{
Index: lams_central/src/java/org/lamsfoundation/lams/web/lamscommunity/LamsCommunityUtil.java
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/lamscommunity/LamsCommunityUtil.java,v
diff -u -r1.3 -r1.3.4.1
--- lams_central/src/java/org/lamsfoundation/lams/web/lamscommunity/LamsCommunityUtil.java 11 Mar 2009 01:25:16 -0000 1.3
+++ lams_central/src/java/org/lamsfoundation/lams/web/lamscommunity/LamsCommunityUtil.java 23 Apr 2009 06:41:43 -0000 1.3.4.1
@@ -30,8 +30,10 @@
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
+import javax.servlet.http.HttpSession;
import org.lamsfoundation.lams.config.Registration;
+import org.lamsfoundation.lams.usermanagement.User;
import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
import org.lamsfoundation.lams.util.Configuration;
import org.lamsfoundation.lams.util.HashUtil;
@@ -109,7 +111,7 @@
* @return
* @throws Exception
*/
- public static String appendAuthInfoToURL(String url) throws Exception {
+ public static String appendAuthInfoToURL(String url, User user) throws Exception {
Registration reg = Configuration.getRegistration();
String serverID;
String serverKey;
@@ -120,13 +122,13 @@
throw new Exception("Attempt to authenticate in lams community without registration");
}
- UserDTO userDTO = (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER);
+
String timestamp = "" + new Date().getTime();
- String hash = LamsCommunityUtil.createAuthenticationHash(timestamp, userDTO.getLamsCommunityUsername(), userDTO
+ String hash = LamsCommunityUtil.createAuthenticationHash(timestamp, user.getLamsCommunityUsername(), user
.getLamsCommunityToken(), serverID, serverKey);
url += "&" + PARAM_LC_USERNAME + "="
- + URLEncoder.encode(userDTO.getLamsCommunityUsername(), "UTF8");
+ + URLEncoder.encode(user.getLamsCommunityUsername(), "UTF8");
url += "&" + PARAM_HASH + "=" + hash;
url += "&" + PARAM_SERVER_ID + "=" + serverID;
url += "&" + PARAM_TIMESTAMP + "=" + timestamp;
@@ -158,5 +160,8 @@
ret.put(PARAM_TIMESTAMP, timestamp);
return ret;
}
+
+
+
}
Fisheye: Tag 1.1.14.1 refers to a dead (removed) revision in file `lams_central/web/community.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_central/web/WEB-INF/web.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/WEB-INF/Attic/web.xml,v
diff -u -r1.41 -r1.41.2.1
--- lams_central/web/WEB-INF/web.xml 30 Mar 2009 05:28:06 -0000 1.41
+++ lams_central/web/WEB-INF/web.xml 23 Apr 2009 06:41:42 -0000 1.41.2.1
@@ -6,6 +6,24 @@
-
-