special users redirect
This commit is contained in:
parent
0790088bdc
commit
a59371a8fa
@ -12,7 +12,5 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<i class="icons teacher fa fa-user"></i>
|
|
||||||
<i class="icons edit fa fa-pencil-square-o fa-lg"></i>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -25,7 +25,6 @@ body {
|
|||||||
outline: #25abd9 solid 3px;
|
outline: #25abd9 solid 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.timestamp {
|
.timestamp {
|
||||||
color: #6D6E6D;
|
color: #6D6E6D;
|
||||||
float: right;
|
float: right;
|
||||||
@ -39,16 +38,6 @@ body {
|
|||||||
transition: color 0.5s;
|
transition: color 0.5s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit, .teacher {
|
|
||||||
color: #C4C4C4;
|
|
||||||
transition: color 0.5s;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.edit:hover, .teacher:hover {
|
|
||||||
color: #25abd9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cross:hover, .crossc:hover{
|
.cross:hover, .crossc:hover{
|
||||||
color: #E14C2B;
|
color: #E14C2B;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,12 +11,14 @@ Router.route('/checkout', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Router.route('/login', function() {
|
Router.route('/login', function() {
|
||||||
if (Meteor.user()) {
|
if (Roles.userIsInRole(Meteor.userId(), ['teacher'])) {
|
||||||
this.redirect('/checkout');
|
this.redirect('/teacher');
|
||||||
} else if (Roles.userIsInRole(Meteor.userId(), ['admin'])) {
|
} else if (Roles.userIsInRole(Meteor.userId(), ['admin'])) {
|
||||||
this.redirect('/admin');
|
this.redirect('/admin');
|
||||||
} else if (Roles.userIsInRole(Meteor.userId(), ['teacher'])) {
|
} else if (Roles.userIsInRole(Meteor.userId(), ['admin', 'teacher'])) {
|
||||||
this.redirect('/teacher');
|
this.redirect('/admin');
|
||||||
|
} else if (Meteor.user()) {
|
||||||
|
this.redirect('/checkout');
|
||||||
} else {
|
} else {
|
||||||
this.render("login");
|
this.render("login");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user