Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 0f8a9c6

Browse files
authored
Ensure you only invite yourself to a Dojo (#296)
1 parent 2628c13 commit 0f8a9c6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/users/is-self.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ function isSelf (args, cb) {
1818
if (args.params.data && _.isUndefined(refUserId)) {
1919
refUserId = args.params.data.childId;
2020
}
21+
// Used by generate-user-invite
22+
if (args.params.data && args.params.data.user && _.isUndefined(refUserId)) {
23+
refUserId = args.params.data.user.id;
24+
}
2125
var isSelf = false;
2226
// Could check upon profile, but seems like an overkill to me
2327
if( userId === refUserId ){

0 commit comments

Comments
 (0)