mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-21 08:02:37 +02:00
fix(torrents): reomve redundant login check code
This commit is contained in:
@@ -50,11 +50,6 @@
|
||||
* init all event bundle
|
||||
*/
|
||||
function init() {
|
||||
// If user is not signed in then redirect back home
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
registerCallback();
|
||||
|
||||
// Make sure the Socket is connected
|
||||
|
||||
@@ -42,13 +42,6 @@
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back signin
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* initTopOneInfo
|
||||
*/
|
||||
|
||||
@@ -15,13 +15,6 @@
|
||||
vm.user = Authentication.user;
|
||||
vm.forumPath = [];
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* init
|
||||
*/
|
||||
|
||||
@@ -23,13 +23,6 @@
|
||||
vm.forumPath = [];
|
||||
vm.postReplyFields = {};
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* buildPager
|
||||
* pagination init
|
||||
|
||||
@@ -16,13 +16,6 @@
|
||||
vm.user = Authentication.user;
|
||||
vm.forumPath = [];
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* buildPager
|
||||
* pagination init
|
||||
|
||||
@@ -14,13 +14,6 @@
|
||||
vm.forumsConfig = MeanTorrentConfig.meanTorrentConfig.forumsConfig;
|
||||
vm.user = Authentication.user;
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* init
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,10 @@
|
||||
.state('invitations', {
|
||||
abstract: true,
|
||||
url: '/invitations',
|
||||
template: '<ui-view/>'
|
||||
template: '<ui-view/>',
|
||||
data: {
|
||||
roles: ['user', 'oper', 'admin']
|
||||
}
|
||||
})
|
||||
.state('invitations.detail', {
|
||||
url: '/detail',
|
||||
|
||||
@@ -21,13 +21,6 @@
|
||||
templateUrl: 'userinfo.html'
|
||||
};
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* buildPager
|
||||
*/
|
||||
|
||||
@@ -26,13 +26,6 @@
|
||||
templateUrl: 'userinfo.html'
|
||||
};
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* user-invitations-changed
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,10 @@
|
||||
.state('messages', {
|
||||
abstract: true,
|
||||
url: '/messages',
|
||||
templateUrl: '/modules/messages/client/views/messages.client.view.html'
|
||||
templateUrl: '/modules/messages/client/views/messages.client.view.html',
|
||||
data: {
|
||||
roles: ['user', 'oper', 'admin']
|
||||
}
|
||||
})
|
||||
.state('messages.box', {
|
||||
url: '/box',
|
||||
|
||||
@@ -15,13 +15,6 @@
|
||||
vm.user = Authentication.user;
|
||||
vm.messageType = 'system';
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* sendMessage
|
||||
* @param isValid
|
||||
|
||||
@@ -16,13 +16,6 @@
|
||||
vm.messageFields = {};
|
||||
vm.deleteList = [];
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* user-unread-count-changed
|
||||
*/
|
||||
|
||||
@@ -33,13 +33,6 @@
|
||||
vm.torrentStatus = 'reviewed';
|
||||
vm.torrentRLevel = 'none';
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* commentBuildPager
|
||||
* pagination init
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
vm.announceConfig = MeanTorrentConfig.meanTorrentConfig.announce;
|
||||
vm.comment = vm.announceConfig.comment;
|
||||
|
||||
// If user is not signed in then redirect back home
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* upload
|
||||
* @param dataUrl
|
||||
|
||||
@@ -33,13 +33,6 @@
|
||||
vm.searchTags = [];
|
||||
vm.progress = 0;
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* commentBuildPager
|
||||
* pagination init
|
||||
|
||||
@@ -29,13 +29,6 @@
|
||||
|
||||
vm.torrentType = $state.current.data.torrentType;
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* commentBuildPager
|
||||
* pagination init
|
||||
|
||||
@@ -25,11 +25,6 @@
|
||||
vm.videoNfo = '';
|
||||
vm.customTorrent = {};
|
||||
|
||||
// If user is not signed in then redirect back home
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* upload
|
||||
* @param dataUrl
|
||||
|
||||
@@ -13,13 +13,6 @@
|
||||
var vm = this;
|
||||
vm.itemsPerPageConfig = MeanTorrentConfig.meanTorrentConfig.itemsPerPage;
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* buildPager
|
||||
* pagination init
|
||||
|
||||
@@ -19,13 +19,6 @@
|
||||
|
||||
vm.searchTags = [];
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* buildPager
|
||||
*/
|
||||
|
||||
@@ -19,13 +19,6 @@
|
||||
|
||||
vm.searchTags = [];
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* buildPager
|
||||
*/
|
||||
|
||||
@@ -19,13 +19,6 @@
|
||||
|
||||
vm.searchTags = [];
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* buildPager
|
||||
*/
|
||||
|
||||
@@ -20,13 +20,6 @@
|
||||
|
||||
vm.searchTags = [];
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* getUserWarningTorrent
|
||||
*/
|
||||
|
||||
@@ -16,13 +16,6 @@
|
||||
vm.lang = getStorageLangService.getLang();
|
||||
vm.user = Authentication.user;
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* auth-user-changed
|
||||
*/
|
||||
|
||||
@@ -9,16 +9,8 @@
|
||||
|
||||
function ResetPasskeyController($scope, $state, $translate, Authentication, UsersService, Notification, ModalConfirmService) {
|
||||
var vm = this;
|
||||
|
||||
vm.user = Authentication.user;
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!vm.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
vm.resetPasskey = function () {
|
||||
var modalOptions = {
|
||||
closeButtonText: $translate.instant('RESET_PASSKEY_CONFIRM_CANCEL'),
|
||||
|
||||
@@ -19,13 +19,6 @@
|
||||
|
||||
vm.searchTags = [];
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* buildPager
|
||||
*/
|
||||
|
||||
@@ -19,13 +19,6 @@
|
||||
|
||||
vm.searchTags = [];
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* buildPager
|
||||
*/
|
||||
|
||||
@@ -13,12 +13,5 @@
|
||||
vm.scoreLevelData = ScoreLevelService.getScoreLevelJson(vm.user.score);
|
||||
vm.announce = MeanTorrentConfig.meanTorrentConfig.announce;
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
}
|
||||
}());
|
||||
|
||||
@@ -19,13 +19,6 @@
|
||||
|
||||
vm.searchTags = [];
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* buildPager
|
||||
*/
|
||||
|
||||
@@ -22,13 +22,6 @@
|
||||
|
||||
vm.searchTags = [];
|
||||
|
||||
/**
|
||||
* If user is not signed in then redirect back home
|
||||
*/
|
||||
if (!Authentication.user) {
|
||||
$state.go('authentication.signin');
|
||||
}
|
||||
|
||||
/**
|
||||
* getWarningTorrent
|
||||
*/
|
||||
|
||||
@@ -24,13 +24,6 @@
|
||||
|
||||
uibButtonConfig.activeClass = 'btn-success';
|
||||
|
||||
///**
|
||||
// * If user is not signed in then redirect back home
|
||||
// */
|
||||
//if (!Authentication.user) {
|
||||
// $state.go('authentication.signin');
|
||||
//}
|
||||
|
||||
/**
|
||||
* buildPager
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user