mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-06 12:28:54 +02:00
fix(forums): fixed normal user and vip/oper only forum access issues
normal user cannot view the vip/oper forum topics in 'global topics' normal user can not view forum by url link enter, system well nav to forums home #40 #20
This commit is contained in:
@@ -89,20 +89,23 @@
|
||||
forumId: $stateParams.forumId
|
||||
}, function (item) {
|
||||
vm.forum = item;
|
||||
|
||||
vm.forumPath.splice(0, 0, {name: vm.forum.name, state: 'forums.view', params: {forumId: vm.forum._id}});
|
||||
});
|
||||
|
||||
// get topics
|
||||
TopicsService.get({
|
||||
forumId: $stateParams.forumId,
|
||||
topicId: $stateParams.topicId
|
||||
}, function (topic) {
|
||||
mtDebug.info(topic);
|
||||
vm.topic = topic;
|
||||
vm.buildPager();
|
||||
// get topics
|
||||
TopicsService.get({
|
||||
forumId: $stateParams.forumId,
|
||||
topicId: $stateParams.topicId
|
||||
}, function (topic) {
|
||||
mtDebug.info(topic);
|
||||
vm.topic = topic;
|
||||
vm.buildPager();
|
||||
|
||||
vm.forumPath.push({name: topic.title, state: undefined});
|
||||
vm.forumPath.push({name: topic.title, state: undefined});
|
||||
});
|
||||
}, function (res) {
|
||||
if (typeof res.data.redirect == 'string') {
|
||||
$state.go(res.data.redirect);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user