From 81cdc9bc7df66f082054b44dd8bf3f59e8f0fe38 Mon Sep 17 00:00:00 2001 From: Ionut Predoi Date: Wed, 26 Oct 2022 15:53:51 +0100 Subject: [PATCH 1/3] NSA-6498 - added link to change org permission level- review invitation page --- src/app/users/getOrganisationPermissions.js | 2 +- src/app/users/views/confirmNewUser.ejs | 5 ++++- src/app/users/views/organisationPermissions.ejs | 6 ++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/app/users/getOrganisationPermissions.js b/src/app/users/getOrganisationPermissions.js index d2c12365..5590381d 100644 --- a/src/app/users/getOrganisationPermissions.js +++ b/src/app/users/getOrganisationPermissions.js @@ -3,7 +3,7 @@ const getOrganisationPermissions = async (req, res) => { csrfToken: req.csrfToken(), userFullName: `${req.session.user.firstName} ${req.session.user.lastName}`, organisationName: req.session.user.organisationName, - selectedLevel: null, + selectedLevel: req.session.user.permission || 0, validationMessages: {}, }); }; diff --git a/src/app/users/views/confirmNewUser.ejs b/src/app/users/views/confirmNewUser.ejs index 00c74b93..280cd3b4 100644 --- a/src/app/users/views/confirmNewUser.ejs +++ b/src/app/users/views/confirmNewUser.ejs @@ -31,7 +31,10 @@
Organisation
<%=organisation.name%>
Permission level
-
<%=role.name%>
+
<%=role.name%> + + Change +
<%} else {%>

No organisation added

diff --git a/src/app/users/views/organisationPermissions.ejs b/src/app/users/views/organisationPermissions.ejs index 0fbce4d2..50ccd704 100644 --- a/src/app/users/views/organisationPermissions.ejs +++ b/src/app/users/views/organisationPermissions.ejs @@ -17,11 +17,13 @@

<%=locals.validationMessages.selectedLevel %>

<% } %>
- + >
- + >
From 53fb37dd5845c8af40fa56f7b17c774b65d51c45 Mon Sep 17 00:00:00 2001 From: Ionut Predoi Date: Thu, 27 Oct 2022 16:38:19 +0100 Subject: [PATCH 2/3] NSA-6498 - Added change button to the personal details -invitation journey --- src/app/users/postNewUser.js | 8 ++++---- src/app/users/views/confirmNewUser.ejs | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/app/users/postNewUser.js b/src/app/users/postNewUser.js index cd64d794..beef0fb0 100644 --- a/src/app/users/postNewUser.js +++ b/src/app/users/postNewUser.js @@ -1,6 +1,6 @@ -const { sendResult } = require('./../../infrastructure/utils'); -const { getUser } = require('./../../infrastructure/directories'); const { emailPolicy } = require('login.dfe.validation'); +const { sendResult } = require('../../infrastructure/utils'); +const { getUser } = require('../../infrastructure/directories'); const validateInput = async (req) => { const nameRegEx = /^[^±!@£$%^&*_+§¡€#¢§¶•ªº«\\/<>?:;|=.,~"]{1,60}$/i; @@ -47,8 +47,8 @@ const postNewUser = async (req, res) => { req.session.user.firstName = model.firstName; req.session.user.lastName = model.lastName; req.session.user.email = model.email; - - return res.redirect('associate-organisation'); + const redirectLink = (req.query.review && req.query.review === 'true') ? 'confirm-new-user' : 'associate-organisation'; + return res.redirect(redirectLink); }; module.exports = postNewUser; diff --git a/src/app/users/views/confirmNewUser.ejs b/src/app/users/views/confirmNewUser.ejs index 280cd3b4..911897e4 100644 --- a/src/app/users/views/confirmNewUser.ejs +++ b/src/app/users/views/confirmNewUser.ejs @@ -11,7 +11,11 @@ Review invite details

Please review these details before sending an invite. The user will need to confirm their email address and create a password before their DfE Sign-in account becomes active.

-

Personal details

+

Personal details + + Change + +

First name
<%=user.firstName%>
From 7cda6574e260205056c8ef463f5a298477da0f97 Mon Sep 17 00:00:00 2001 From: Univer-lion-lab Date: Fri, 28 Oct 2022 08:41:50 +0100 Subject: [PATCH 3/3] Update template.json --- DevOps/templates/template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DevOps/templates/template.json b/DevOps/templates/template.json index 481ccca5..bbd16983 100644 --- a/DevOps/templates/template.json +++ b/DevOps/templates/template.json @@ -13,7 +13,7 @@ }, "branch": { "type": "string", - "defaultValue": "feature/DSI-5160-61", + "defaultValue": "main", "metadata": { "description": "Branch that use for the ARM templateLinks" }