special users redirect
This commit is contained in:
parent
0790088bdc
commit
a59371a8fa
@ -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>
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user