Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7a1bc41

Browse files
author
Cristian
committed
Adapt security calls & Fix user schema
1 parent 1138a97 commit 7a1bc41

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

‎imports/api/users/server/methods.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ Meteor.methods({
3030
updateUserData(userId, options) {
3131
check(userId, String);
3232
check(options, Object);
33-
Security.checkLoggedIn();
33+
Security.checkLoggedIn(userId);
3434
Security.checkLoggedUser(userId);
3535
RepoUsers.updateById(userId, options);
3636
},
3737
changeUserPassword(userId, password) {
3838
check(userId, String);
3939
check(password, String);
40-
Security.checkLoggedIn();
40+
Security.checkLoggedIn(userId);
4141
Security.checkLoggedUser(userId);
4242
Accounts.setPassword(userId, password);
4343
},

‎imports/api/users/server/publications.test.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Factory.define('user', Meteor.users, {
2323
},
2424
];
2525
},
26+
createdAt: new Date(),
2627
});
2728

2829
describe('users publications', () => {

‎imports/db/users/schema.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default new SimpleSchema({
88
'emails.$.address': { type: String },
99
'emails.$.verified': { type: Boolean },
1010
createdAt: { type: Date },
11-
services: { type: Object, blackbox: true },
11+
services: { type: Object, blackbox: true,optional: true },
1212
roles: {
1313
type: Object,
1414
optional: true,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /