Index: lams_admin/conf/language/lams/ApplicationResources.properties
===================================================================
diff -u -r314c964157e7eefb28c24d94cdb798c2fcc640e7 -re59191f853aa9bdaf89c4e430fa9517541c073ed
--- lams_admin/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 314c964157e7eefb28c24d94cdb798c2fcc640e7)
+++ lams_admin/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision e59191f853aa9bdaf89c4e430fa9517541c073ed)
@@ -590,5 +590,32 @@
audit.remarks =Remarks
config.allow.direct.access.for.integration.learners =Allow direct access to main LAMS page for integration learners.
+admin.policies.title =Policies and consents
+admin.add.edit.policy =Add/edit new policy
+label.name =Name
+label.policy.type =Policy type
+label.policy.status =Policy status
+label.version =Version
+label.last.modified =Last modified
+label.consents =Consents
+label.add.new.policy =Add a new policy
+label.policy.status.hint =An active policy will require consent from new users. Existing users will need to consent to this policy on their next log in.
+label.policy.status.active =Active
+label.policy.status.inactive =Inactive
+label.policy.type.site =Site policy
+label.policy.type.privacy =Privacy policy
+label.policy.type.third.party =Third party policy
+label.policy.type.other =Other policy
+label.summary =Summary
+label.full.policy =Full policy
+label.view.previous.versions =View previous versions
+label.activate =Activate
+label.deactivate =Deactivate
+label.minor.change =Minor change
+label.policy.consents =Policy consents
+label.consented =Consented?
+label.consented.on =Consented on
+label.user.consents =User consents
+label.user.full.name =Full name
#======= End labels: Exported 583 labels for en AU =====
Index: lams_build/lib/lams/lams.jar
===================================================================
diff -u -r57a0d71c06a535dbb678ecfcd15e62bc94ec8dbf -re59191f853aa9bdaf89c4e430fa9517541c073ed
Binary files differ
Index: lams_central/conf/language/lams/ApplicationResources_en_AU.properties
===================================================================
diff -u -ra4002ee13a835e74c08e3d657494f1c97b531013 -re59191f853aa9bdaf89c4e430fa9517541c073ed
--- lams_central/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision a4002ee13a835e74c08e3d657494f1c97b531013)
+++ lams_central/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision e59191f853aa9bdaf89c4e430fa9517541c073ed)
@@ -804,6 +804,26 @@
authoring.error.application.exercise.not.blank.and.grade=Application Exercise {0} may not be blank and must have a grade.
authoring.label.grade=Grade
authoring.label.none=None
+
+label.policies.title=Policies
+label.agree.to.policies.before.proceeding=Please agree to all the policies before proceeding
+label.consent.required=Consent is required
+label.agree.to.policy=I agree to the policy
+label.policy.name =Policy name
+label.policy.type =Policy type
+label.policy.type.site =Site policy
+label.policy.type.privacy =Privacy policy
+label.policy.type.third.party =Third party policy
+label.policy.type.other =Other policy
+label.summary =Summary
+label.full.policy =Full policy
+label.consent =Consent
+label.policies.consents =Policies and consents
+label.version =Version
+label.consented =Consented?
+label.consented.on =Consented on
+label.policy.details =Policy details
+
#=================== Specific to Team Based Learning (TBL) =========================#
authoring.tbl.template.title=Team Based Learning
Index: lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java
===================================================================
diff -u -r5bcac6182758458fcd994b9bda8c6620a9493265 -re59191f853aa9bdaf89c4e430fa9517541c073ed
--- lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java (.../IndexAction.java) (revision 5bcac6182758458fcd994b9bda8c6620a9493265)
+++ lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java (.../IndexAction.java) (revision e59191f853aa9bdaf89c4e430fa9517541c073ed)
@@ -43,6 +43,7 @@
import org.lamsfoundation.lams.index.IndexLinkBean;
import org.lamsfoundation.lams.integration.service.IIntegrationService;
import org.lamsfoundation.lams.integration.service.IntegrationService;
+import org.lamsfoundation.lams.policies.service.IPolicyService;
import org.lamsfoundation.lams.usermanagement.Organisation;
import org.lamsfoundation.lams.usermanagement.Role;
import org.lamsfoundation.lams.usermanagement.User;
@@ -71,6 +72,7 @@
private static Logger log = Logger.getLogger(IndexAction.class);
private static IUserManagementService userManagementService;
private static IIntegrationService integrationService;
+ private static IPolicyService policyService;
@Override
@SuppressWarnings("unchecked")
@@ -103,6 +105,11 @@
&& loggedInUser.getTwoFactorAuthenticationSecret() == null) {
return mapping.findForward("twoFactorAuthentication");
}
+
+ // check if user needs to get his shared two-factor authorization secret
+ if (getPolicyService().isPolicyConsentRequiredForUser(loggedInUser.getUserId())) {
+ return mapping.findForward("policyConsents");
+ }
User user = getUserManagementService().getUserByLogin(userDTO.getLogin());
request.setAttribute("portraitUuid", user.getPortraitUuid());
@@ -301,6 +308,14 @@
}
return userManagementService;
}
+
+ private IPolicyService getPolicyService() {
+ if (policyService == null) {
+ policyService = (IPolicyService) WebApplicationContextUtils
+ .getRequiredWebApplicationContext(getServlet().getServletContext()).getBean("policyService");
+ }
+ return policyService;
+ }
private static boolean isPedagogicalPlannerAvailable() {
String lamsEarPath = Configuration.get(ConfigurationKeys.LAMS_EAR_DIR);
Index: lams_central/web/WEB-INF/struts-config.xml
===================================================================
diff -u -r5bcac6182758458fcd994b9bda8c6620a9493265 -re59191f853aa9bdaf89c4e430fa9517541c073ed
--- lams_central/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 5bcac6182758458fcd994b9bda8c6620a9493265)
+++ lams_central/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision e59191f853aa9bdaf89c4e430fa9517541c073ed)
@@ -141,6 +141,11 @@
redirect="false"
/>
+
+
+
-
+
+
+
+
+
+
+ PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED