diff --git a/anchor/server/api/signup.js b/anchor/server/api/signup.js
index e7e750d..ad9f421 100644
--- a/anchor/server/api/signup.js
+++ b/anchor/server/api/signup.js
@@ -75,7 +75,7 @@ internals.applyRoutes = function (server, next) {
Joi.validate(request.payload.password, new PasswordComplexity(complexityOptions), (err, value) => {
if (err) {
- return reply(Boom.conflict('Password does not meet complexity standards'));
+ return reply(Boom.conflict('Your password must have at least 8 characters, 1 lowercase letter, 1 uppercase letter, 1 numeric character, and 1 symbol.'));
}
reply(true);
});
diff --git a/anchor/server/api/users.js b/anchor/server/api/users.js
index 4dbe101..5b69984 100644
--- a/anchor/server/api/users.js
+++ b/anchor/server/api/users.js
@@ -17,7 +17,8 @@ internals.applyRoutes = function (server, next) {
path: '/table/users',
config: {
auth: {
- strategies: ['simple', 'jwt', 'session']
+ strategies: ['simple', 'jwt', 'session'],
+ scope: ['root','clinician', 'analyst', 'admin']
},
validate: {
query: Joi.any()
@@ -56,8 +57,8 @@ internals.applyRoutes = function (server, next) {
}
query.inStudy = true;
}
- //clinician
- else if (accessLevel === 2) {
+ //clinician or root
+ else if (accessLevel === 2 || accessLevel === 3) {
const userAccess = JSON.parse(request.auth.credentials.user.roles.clinician.userAccess);
const patientsObjectIds = [];
@@ -70,7 +71,7 @@ internals.applyRoutes = function (server, next) {
_id: { $in: patientsObjectIds }
};
- //this is the global query object
+ //this is the global query object
query = filter;
}
@@ -226,7 +227,7 @@ internals.applyRoutes = function (server, next) {
config: {
auth: {
strategies: ['simple', 'jwt', 'session'],
- scope: 'admin'
+ scope: ['root','admin']
}
},
handler: function (request, reply) {
@@ -247,6 +248,7 @@ internals.applyRoutes = function (server, next) {
});
+
server.route({
method: 'GET',
path: '/users/my',
@@ -338,7 +340,7 @@ internals.applyRoutes = function (server, next) {
Joi.validate(request.payload.password, new PasswordComplexity(complexityOptions), (err, value) => {
if (err) {
- return reply(Boom.conflict('Password does not meet complexity standards'));
+ return reply(Boom.conflict('Your password must have at least 8 characters, 1 lowercase letter, 1 uppercase letter, 1 numeric character, and 1 symbol.'));
}
reply(true);
});
@@ -394,11 +396,12 @@ internals.applyRoutes = function (server, next) {
config: {
auth: {
strategies: ['simple', 'jwt', 'session'],
- scope: 'admin'
+ scope: ['admin', 'root']
},
validate: {
params: {
- id: Joi.string().invalid('000000000000000000000000')
+ id: Joi.string()
+ // .invalid('000000000000000000000000')
},
payload: {
username: Joi.string().token().lowercase().required(),
@@ -745,7 +748,7 @@ internals.applyRoutes = function (server, next) {
Joi.validate(request.payload.password, new PasswordComplexity(complexityOptions), (err, value) => {
if (err) {
- return reply(Boom.conflict('Password does not meet complexity standards'));
+ return reply(Boom.conflict('Your password must have at least 8 characters, 1 lowercase letter, 1 uppercase letter, 1 numeric character, and 1 symbol.'));
}
reply(true);
});
diff --git a/anchor/server/web/partials/nav.handlebars b/anchor/server/web/partials/nav.handlebars
index 677dd6b..81dc8a7 100644
--- a/anchor/server/web/partials/nav.handlebars
+++ b/anchor/server/web/partials/nav.handlebars
@@ -31,7 +31,7 @@
LOGIN
- SIGNUP
+ SIGN UP
{{/if}}
diff --git a/anchor/server/web/partials/notification.handlebars b/anchor/server/web/partials/notification.handlebars
index ca4ac2f..de65bf1 100644
--- a/anchor/server/web/partials/notification.handlebars
+++ b/anchor/server/web/partials/notification.handlebars
@@ -1,7 +1,7 @@
@@ -18,7 +20,5 @@
background-color: #bbb;
}
-
+
diff --git a/anchor/server/web/templates/users/create.handlebars b/anchor/server/web/templates/users/create.handlebars
index f02384b..80050b5 100644
--- a/anchor/server/web/templates/users/create.handlebars
+++ b/anchor/server/web/templates/users/create.handlebars
@@ -6,15 +6,17 @@
Create User
-
+
*Password must include 8-20 characters, 1 lowercase, 1 uppercase, and 1 special character*
+
diff --git a/anchor/server/web/templates/users/index.handlebars b/anchor/server/web/templates/users/index.handlebars
index a075061..350d83d 100644
--- a/anchor/server/web/templates/users/index.handlebars
+++ b/anchor/server/web/templates/users/index.handlebars
@@ -138,3 +138,4 @@
});
+