-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinitialize.users.js
231 lines (206 loc) · 7.24 KB
/
initialize.users.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
// if the database is empty on server start, create some sample data.
// we create a separate bootstrap.users.js file
// because we'll be wanting to set up a number of patient-scenario test users
Meteor.startup(function () {
if (process.env.Muppets) {
console.info('No muppets in database! Adding the Muppet Show cast.');
var userId = null;
if (Meteor.users.find({'emails.address': '[email protected]'}).count() === 0) {
userId = Accounts.createUser({
username: 'animal',
password: 'animal',
email: '[email protected]',
profile: {
name: {
text: 'Animal',
given: 'Animal',
family: 'Meyham'
},
role: 'Muppet',
alignment: 'Chaotic Neutral',
quote: 'Beat drums! Beat drums! Kill! Kill! Kill!',
photo: [{
url: '/packages/awatson1978_accounts-muppets/muppets/Animal.jpg'
}],
avatar: '/packages/awatson1978_accounts-muppets/muppets/thumbnails/Animal.jpg'
}
});
console.info('Account created: ' + userId);
}
if (Meteor.users.find({'emails.address': '[email protected]'}).count() === 0) {
userId = Accounts.createUser({
username: 'harry',
password: 'harry',
email: '[email protected]',
profile: {
name: {
text: 'Crazy Harry',
given: 'Crazy',
family: 'Harry'
},
role: 'Muppet',
alignment: 'Chaotic Evil',
quote: 'Did somebody say bang?',
photo: [{
url: '/packages/awatson1978_accounts-muppets/muppets/CrazyHarry.jpg'
}],
avatar: '/packages/awatson1978_accounts-muppets/muppets/thumbnails/CrazyHarry.jpg'
}
});
console.info('Account created: ' + userId);
}
if (Meteor.users.find({'emails.address': '[email protected]'}).count() === 0) {
userId = Accounts.createUser({
username: 'drhoneydew',
password: 'drhoneydew',
email: '[email protected]',
profile: {
name: {
text: 'Dr. Honeydew',
given: 'Bunsen',
family: 'Honneydew'
},
role: 'Muppet',
alignment: 'Lawful Evil',
quote: 'At last, your family can be protected from the heartbreak of gorilla invasion.',
photo: [{
url: '/packages/awatson1978_accounts-muppets/muppets/DrHoneydew.jpg'
}],
avatar: '/packages/awatson1978_accounts-muppets/muppets/thumbnails/DrHoneydew.jpg'
}
});
console.info('Account created: ' + userId);
}
if (Meteor.users.find({'emails.address': '[email protected]'}).count() === 0) {
userId = Accounts.createUser({
username: 'fozzy',
password: 'fozzy',
email: '[email protected]',
profile: {
name: {
text: 'Fozzy',
given: 'Fozzy',
family: 'Bear'
},
role: 'Muppet',
alignment: 'Neutral Good',
quote: 'My cousin is so dumb, he thinks eggs benedict is a mafia gangster!',
photo: [{
url: '/packages/awatson1978_accounts-muppets/muppets/Fozzy.jpg'
}],
avatar: '/packages/awatson1978_accounts-muppets/muppets/thumbnails/Fozzy.jpg'
}
});
console.info('Account created: ' + userId);
}
if (Meteor.users.find({'emails.address': '[email protected]'}).count() === 0) {
userId = Accounts.createUser({
username: 'gonzo',
password: 'gonzo',
email: '[email protected]',
profile: {
name: {
text: 'Gonzo',
given: 'Gonzo',
family: 'Great'
},
role: 'Muppet',
alignment: 'Chaotic Good',
quote: 'Cancel my bread impersonation act! They didnt deliver my poppy seeds! You wouldnt want me to walk out there naked, would you?',
photo: [{
url: '/packages/awatson1978_accounts-muppets/muppets/Gonzo.jpg'
}],
avatar: '/packages/awatson1978_accounts-muppets/muppets/thumbnails/Gonzo.jpg'
}
});
console.info('Account created: ' + userId);
}
if (Meteor.users.find({'emails.address': '[email protected]'}).count() === 0) {
userId = Accounts.createUser({
username: 'sam',
password: 'sam',
email: '[email protected]',
profile: {
name: {
text: 'Sam the Eagle',
given: 'Sam',
family: 'Eagle'
},
role: 'Muppet',
alignment: 'Lawful Neutral',
quote: 'You are all weird.',
photo: [{
url: '/packages/awatson1978_accounts-muppets/muppets/SamEagle.jpg'
}],
avatar: '/packages/awatson1978_accounts-muppets/muppets/thumbnails/SamEagle.jpg'
}
});
console.info('Account created: ' + userId);
}
if (Meteor.users.find({'emails.address': '[email protected]'}).count() === 0) {
userId = Accounts.createUser({
username: 'sweetums',
password: 'sweetums',
email: '[email protected]',
profile: {
name: {
text: 'Sweetums',
given: 'Sweetums'
},
role: 'Muppet',
alignment: 'True Neutral',
quote: 'Hey! Hey, were you goin? Hey! Wait for me! I wanna go to Hollywood! Wait for me! Cmon, guys! Wait, please! I wanna go to Hollywood!',
photo: [{
url: '/packages/awatson1978_accounts-muppets/muppets/Sweetums.jpg'
}],
avatar: '/packages/awatson1978_accounts-muppets/muppets/thumbnails/Sweetums.jpg'
}
});
console.info('Account created: ' + userId);
}
if (Meteor.users.find({'emails.address': '[email protected]'}).count() === 0) {
userId = Accounts.createUser({
username: 'kermit',
password: 'kermit',
email: '[email protected]',
profile: {
name: {
text: 'Kermit the Frog',
given: 'Kermit',
family: 'Frog'
},
role: 'Muppet',
alignment: 'Lawful Good',
quote: 'I guess I was wrong when I said I never promised anyone. I promised me.',
photo: [{
url: '/packages/awatson1978_accounts-muppets/muppets/Kermit.jpg'
}],
avatar: '/packages/awatson1978_accounts-muppets/muppets/thumbnails/Kermit.jpg'
}
});
console.info('Account created: ' + userId);
}
if (Meteor.users.find({'emails.address': '[email protected]'}).count() === 0) {
userId = Accounts.createUser({
username: 'mspiggy',
password: 'mspiggy',
email: '[email protected]',
profile: {
name: {
text: 'Ms. Piggy',
given: 'Piggy',
family: 'Lee'
},
role: 'Muppet',
alignment: 'Neutral Evil',
quote: 'Kermie, it seems that every time we have a beautiful lady on the show, you completely forget about me.',
photo: [{
url: '/packages/awatson1978_accounts-muppets/muppets/MsPiggy.jpg'
}],
avatar: '/packages/awatson1978_accounts-muppets/muppets/thumbnails/MsPiggy.jpg'
}
});
console.info('Account created: ' + userId);
}
}
});