Merge branch 'master' of https://github.com/yamanq/chromebook-checkout-meteor
This commit is contained in:
commit
9fef23a91e
0
chromebook-checkout-meteor/.meteor/.finished-upgraders
Executable file → Normal file
0
chromebook-checkout-meteor/.meteor/.finished-upgraders
Executable file → Normal file
0
chromebook-checkout-meteor/.meteor/.gitignore
vendored
Executable file → Normal file
0
chromebook-checkout-meteor/.meteor/.gitignore
vendored
Executable file → Normal file
0
chromebook-checkout-meteor/.meteor/.id
Executable file → Normal file
0
chromebook-checkout-meteor/.meteor/.id
Executable file → Normal file
0
chromebook-checkout-meteor/.meteor/packages
Executable file → Normal file
0
chromebook-checkout-meteor/.meteor/packages
Executable file → Normal file
0
chromebook-checkout-meteor/.meteor/platforms
Executable file → Normal file
0
chromebook-checkout-meteor/.meteor/platforms
Executable file → Normal file
0
chromebook-checkout-meteor/.meteor/release
Executable file → Normal file
0
chromebook-checkout-meteor/.meteor/release
Executable file → Normal file
0
chromebook-checkout-meteor/.meteor/versions
Executable file → Normal file
0
chromebook-checkout-meteor/.meteor/versions
Executable file → Normal file
0
chromebook-checkout-meteor/client/admin.css
Executable file → Normal file
0
chromebook-checkout-meteor/client/admin.css
Executable file → Normal file
0
chromebook-checkout-meteor/client/admin.html
Executable file → Normal file
0
chromebook-checkout-meteor/client/admin.html
Executable file → Normal file
0
chromebook-checkout-meteor/client/admin.js
Executable file → Normal file
0
chromebook-checkout-meteor/client/admin.js
Executable file → Normal file
0
chromebook-checkout-meteor/client/checkout.css
Executable file → Normal file
0
chromebook-checkout-meteor/client/checkout.css
Executable file → Normal file
0
chromebook-checkout-meteor/client/checkout.html
Executable file → Normal file
0
chromebook-checkout-meteor/client/checkout.html
Executable file → Normal file
0
chromebook-checkout-meteor/client/checkout.js
Executable file → Normal file
0
chromebook-checkout-meteor/client/checkout.js
Executable file → Normal file
0
chromebook-checkout-meteor/client/chromebook.css
Executable file → Normal file
0
chromebook-checkout-meteor/client/chromebook.css
Executable file → Normal file
0
chromebook-checkout-meteor/client/chromebook.html
Executable file → Normal file
0
chromebook-checkout-meteor/client/chromebook.html
Executable file → Normal file
0
chromebook-checkout-meteor/client/chromebook.js
Executable file → Normal file
0
chromebook-checkout-meteor/client/chromebook.js
Executable file → Normal file
0
chromebook-checkout-meteor/client/initial.html
Executable file → Normal file
0
chromebook-checkout-meteor/client/initial.html
Executable file → Normal file
0
chromebook-checkout-meteor/client/initial.js
Executable file → Normal file
0
chromebook-checkout-meteor/client/initial.js
Executable file → Normal file
0
chromebook-checkout-meteor/client/login.css
Executable file → Normal file
0
chromebook-checkout-meteor/client/login.css
Executable file → Normal file
0
chromebook-checkout-meteor/client/login.html
Executable file → Normal file
0
chromebook-checkout-meteor/client/login.html
Executable file → Normal file
0
chromebook-checkout-meteor/client/main.css
Executable file → Normal file
0
chromebook-checkout-meteor/client/main.css
Executable file → Normal file
0
chromebook-checkout-meteor/client/main.html
Executable file → Normal file
0
chromebook-checkout-meteor/client/main.html
Executable file → Normal file
9
chromebook-checkout-meteor/client/router.js
Executable file → Normal file
9
chromebook-checkout-meteor/client/router.js
Executable file → Normal file
@ -19,16 +19,17 @@ Router.route('/login', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Router.route('/admin', function() {
|
Router.route('/admin', function() {
|
||||||
if (Meteor.user().roles[0]==='admin') {
|
if (Roles.userIsInRole(Meteor.userId(), ['admin'])) {
|
||||||
this.render("admin");
|
this.render("admin");
|
||||||
} else {
|
} else {
|
||||||
this.redirect('/checkout');
|
this.redirect('/login');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Router.route('/teacher', function() {
|
Router.route('/teacher', function() {
|
||||||
if (Meteor.user().roles[0]==='teacher') {
|
if (Roles.userIsInRole(Meteor.userId(), ['admin', 'teacher'])) {
|
||||||
this.render("teacher");
|
this.render("teacher");
|
||||||
} else {
|
} else {
|
||||||
this.redirect('/checkout');
|
this.redirect('/login');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
0
chromebook-checkout-meteor/collections/chromebooks.js
Executable file → Normal file
0
chromebook-checkout-meteor/collections/chromebooks.js
Executable file → Normal file
0
chromebook-checkout-meteor/public/fonts/Lato-Light.woff
Executable file → Normal file
0
chromebook-checkout-meteor/public/fonts/Lato-Light.woff
Executable file → Normal file
0
chromebook-checkout-meteor/public/ico/chrico.png
Executable file → Normal file
0
chromebook-checkout-meteor/public/ico/chrico.png
Executable file → Normal file
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
0
chromebook-checkout-meteor/public/ico/favicon.png
Executable file → Normal file
0
chromebook-checkout-meteor/public/ico/favicon.png
Executable file → Normal file
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.9 KiB |
0
chromebook-checkout-meteor/public/images/bg.jpg
Executable file → Normal file
0
chromebook-checkout-meteor/public/images/bg.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 264 KiB |
4
chromebook-checkout-meteor/server/users.js
Executable file → Normal file
4
chromebook-checkout-meteor/server/users.js
Executable file → Normal file
@ -14,9 +14,7 @@ Meteor.publish('chromebook', function() {
|
|||||||
var adminusers = [
|
var adminusers = [
|
||||||
"ybq987@gmail.com",
|
"ybq987@gmail.com",
|
||||||
"mminer@bloomfield.org",
|
"mminer@bloomfield.org",
|
||||||
"qalieh.yaman90@bloomfield.org",
|
"qalieh.yaman90@bloomfield.org"
|
||||||
"ksjdragon@gmail.com",
|
|
||||||
"chthomas@bloomfield.org"
|
|
||||||
];
|
];
|
||||||
for (var i = 0; i < adminusers.length; i++) {
|
for (var i = 0; i < adminusers.length; i++) {
|
||||||
var adminuser = adminusers[i];
|
var adminuser = adminusers[i];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user