special users redirect

This commit is contained in:
ksjdragon 2015-01-18 19:23:54 -05:00
parent 0790088bdc
commit a59371a8fa
3 changed files with 6 additions and 17 deletions

View File

@ -12,7 +12,5 @@
{{/each}}
</div>
</div>
<i class="icons teacher fa fa-user"></i>
<i class="icons edit fa fa-pencil-square-o fa-lg"></i>
</div>
</template>

View File

@ -25,7 +25,6 @@ body {
outline: #25abd9 solid 3px;
}
.timestamp {
color: #6D6E6D;
float: right;
@ -39,16 +38,6 @@ body {
transition: color 0.5s;
}
.edit, .teacher {
color: #C4C4C4;
transition: color 0.5s;
}
.edit:hover, .teacher:hover {
color: #25abd9;
}
.cross:hover, .crossc:hover{
color: #E14C2B;
}

View File

@ -11,12 +11,14 @@ Router.route('/checkout', function() {
});
Router.route('/login', function() {
if (Meteor.user()) {
this.redirect('/checkout');
if (Roles.userIsInRole(Meteor.userId(), ['teacher'])) {
this.redirect('/teacher');
} else if (Roles.userIsInRole(Meteor.userId(), ['admin'])) {
this.redirect('/admin');
} else if (Roles.userIsInRole(Meteor.userId(), ['teacher'])) {
this.redirect('/teacher');
} else if (Roles.userIsInRole(Meteor.userId(), ['admin', 'teacher'])) {
this.redirect('/admin');
} else if (Meteor.user()) {
this.redirect('/checkout');
} else {
this.render("login");
}