Commit c757f60d by GD-A-150752

blocked-role-added

parent f6b48406
......@@ -25,6 +25,11 @@ export const seedDB = async () => {
Permissions: [PERMISSIONS.CAN_LOGIN, PERMISSIONS.CAN_UPDATE_OWN_USER],
Description: '',
}).toPromise(),
Roles.insert({
Title: 'Blocked',
Permissions: [],
Description: '',
}),
]);
} else {
// Update Roles Permissions
......
......@@ -15,7 +15,7 @@ Meteor.methods({
},
registerUser(user: any): string {
const myRole = Roles.findOne({ Title: user.role });
const defaultRole = Roles.findOne({ Title: user.role });
if (!Accounts.findUserByEmail(user.email)) {
const userObj = {
......@@ -24,7 +24,7 @@ Meteor.methods({
username: user.username,
profile: {
Name: user.name,
Role: myRole._id,
Role: defaultRole._id,
},
};
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