feat(torrents): add ‘role’ attribute for torrent type configure

if role value of 'user' will show the type menu item in torrent submenu
if role value of 'vip' do not show as menu item in torrent submenu, it is only list torrents in VIP area
it can be include some movie not in TMDB(or Unsuitable for normal users, such as Adult?) and input all info manually.
these resource only VIP or oper and admin can upload

#20 #32
This commit is contained in:
OldHawk
2017-12-06 14:46:45 +08:00
parent fd1c1a5c81
commit 38aa428d43
6 changed files with 57 additions and 22 deletions

View File

@@ -107,7 +107,11 @@
* @returns {boolean}
*/
function isContextUserSelf() {
return vm.user ? vm.user.username === vm.authentication.user.username : false;
if(!vm.user || !vm.authentication.user){
return false;
}else {
return vm.user.username === vm.authentication.user.username;
}
}
/**