Commit c757f60d by GD-A-150752

blocked-role-added

parent f6b48406
...@@ -25,6 +25,11 @@ export const seedDB = async () => { ...@@ -25,6 +25,11 @@ export const seedDB = async () => {
Permissions: [PERMISSIONS.CAN_LOGIN, PERMISSIONS.CAN_UPDATE_OWN_USER], Permissions: [PERMISSIONS.CAN_LOGIN, PERMISSIONS.CAN_UPDATE_OWN_USER],
Description: '', Description: '',
}).toPromise(), }).toPromise(),
Roles.insert({
Title: 'Blocked',
Permissions: [],
Description: '',
}),
]); ]);
} else { } else {
// Update Roles Permissions // Update Roles Permissions
......
...@@ -15,7 +15,7 @@ Meteor.methods({ ...@@ -15,7 +15,7 @@ Meteor.methods({
}, },
registerUser(user: any): string { registerUser(user: any): string {
const myRole = Roles.findOne({ Title: user.role }); const defaultRole = Roles.findOne({ Title: user.role });
if (!Accounts.findUserByEmail(user.email)) { if (!Accounts.findUserByEmail(user.email)) {
const userObj = { const userObj = {
...@@ -24,7 +24,7 @@ Meteor.methods({ ...@@ -24,7 +24,7 @@ Meteor.methods({
username: user.username, username: user.username,
profile: { profile: {
Name: user.name, Name: user.name,
Role: myRole._id, Role: defaultRole._id,
}, },
}; };
return Accounts.createUser(userObj); return Accounts.createUser(userObj);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment