keep friends from seeing extra item views, but allow them to see list sizes
This commit is contained in:
parent
e2c0669860
commit
8f529d68d3
4 changed files with 12 additions and 4 deletions
|
@ -35,9 +35,10 @@
|
||||||
"canPlayClips": {"guest": 2, "member": 2, "friend": 4, "staff": 4, "admin": 4},
|
"canPlayClips": {"guest": 2, "member": 2, "friend": 4, "staff": 4, "admin": 4},
|
||||||
"canPlayVideo": {"guest": 1, "member": 1, "friend": 4, "staff": 4, "admin": 4},
|
"canPlayVideo": {"guest": 1, "member": 1, "friend": 4, "staff": 4, "admin": 4},
|
||||||
"canSeeDebugMenu": {"staff": true, "admin": true},
|
"canSeeDebugMenu": {"staff": true, "admin": true},
|
||||||
|
"canSeeExtraItemViews": {"staff": true, "admin": true},
|
||||||
"canSeeFiles": {"staff": true, "admin": true},
|
"canSeeFiles": {"staff": true, "admin": true},
|
||||||
"canSeeItem": {"guest": 3, "member": 3, "friend": 4, "staff": 4, "admin": 4},
|
"canSeeItem": {"guest": 3, "member": 3, "friend": 4, "staff": 4, "admin": 4},
|
||||||
"canSeeExtraItemViews": {"friend": true, "staff": true, "admin": true},
|
"canSeeListSize": {"friend": true, "staff": true, "admin": true},
|
||||||
"canSendMail": {"staff": true, "admin": true},
|
"canSendMail": {"staff": true, "admin": true},
|
||||||
"canUploadVideo": {"guest": false, "member": false, "staff": true, "admin": true}
|
"canUploadVideo": {"guest": false, "member": false, "staff": true, "admin": true}
|
||||||
},
|
},
|
||||||
|
|
|
@ -33,9 +33,10 @@
|
||||||
"canPlayClips": {"guest": 1, "member": 1, "staff": 4, "admin": 4},
|
"canPlayClips": {"guest": 1, "member": 1, "staff": 4, "admin": 4},
|
||||||
"canPlayVideo": {"guest": 1, "member": 1, "staff": 4, "admin": 4},
|
"canPlayVideo": {"guest": 1, "member": 1, "staff": 4, "admin": 4},
|
||||||
"canSeeDebugMenu": {"staff": true, "admin": true},
|
"canSeeDebugMenu": {"staff": true, "admin": true},
|
||||||
|
"canSeeExtraItemViews": {"staff": true, "admin": true},
|
||||||
"canSeeFiles": {"staff": true, "admin": true},
|
"canSeeFiles": {"staff": true, "admin": true},
|
||||||
"canSeeItem": {"guest": 1, "member": 1, "staff": 4, "admin": 4},
|
"canSeeItem": {"guest": 1, "member": 1, "staff": 4, "admin": 4},
|
||||||
"canSeeExtraItemViews": {"friend": true, "staff": true, "admin": true},
|
"canSeeListSize": {"friend": true, "staff": true, "admin": true},
|
||||||
"canSendMail": {"staff": true, "admin": true},
|
"canSendMail": {"staff": true, "admin": true},
|
||||||
"canUploadVideo": {"guest": false, "member": true, "staff": true, "admin": true}
|
"canUploadVideo": {"guest": false, "member": true, "staff": true, "admin": true}
|
||||||
},
|
},
|
||||||
|
|
|
@ -31,6 +31,8 @@ pandora.ui.statusbar = function() {
|
||||||
|
|
||||||
function getText(data) {
|
function getText(data) {
|
||||||
var ui = pandora.user.ui,
|
var ui = pandora.user.ui,
|
||||||
|
canSeeFiles = pandora.site.capabilities.canSeeFiles[pandora.user.level],
|
||||||
|
canSeeListSize = pandora.site.capabilities.canSeeListSize[pandora.user.level],
|
||||||
itemName = ui.listView == 'clip'
|
itemName = ui.listView == 'clip'
|
||||||
? (data.items == 1 ? 'Clip' : 'Clips')
|
? (data.items == 1 ? 'Clip' : 'Clips')
|
||||||
: (pandora.site.itemName[data.items == 1 ? 'singular' : 'plural']),
|
: (pandora.site.itemName[data.items == 1 ? 'singular' : 'plural']),
|
||||||
|
@ -41,10 +43,14 @@ pandora.ui.statusbar = function() {
|
||||||
} else if (data.duration) {
|
} else if (data.duration) {
|
||||||
parts.push(Ox.formatDuration(data.duration, 'short'));
|
parts.push(Ox.formatDuration(data.duration, 'short'));
|
||||||
}
|
}
|
||||||
if (pandora.site.capabilities.canSeeFiles[pandora.user.level]) {
|
if (canSeeFiles) {
|
||||||
data.files && parts.push(data.files + ' file' + (data.files == 1 ? '' : 's'));
|
data.files && parts.push(data.files + ' file' + (data.files == 1 ? '' : 's'));
|
||||||
data.duration && parts.push(Ox.formatDuration(data.duration));
|
data.duration && parts.push(Ox.formatDuration(data.duration));
|
||||||
|
}
|
||||||
|
if (canSeeListSize) {
|
||||||
data.size && parts.push(Ox.formatValue(data.size, 'B'));
|
data.size && parts.push(Ox.formatValue(data.size, 'B'));
|
||||||
|
}
|
||||||
|
if (canSeeFiles) {
|
||||||
data.pixels && parts.push(Ox.formatValue(data.pixels, 'px'));
|
data.pixels && parts.push(Ox.formatValue(data.pixels, 'px'));
|
||||||
}
|
}
|
||||||
return parts.join(', ');
|
return parts.join(', ');
|
||||||
|
|
|
@ -130,7 +130,7 @@ pandora.ui.usersDialog = function() {
|
||||||
align: 'center',
|
align: 'center',
|
||||||
format: function(value, data) {
|
format: function(value, data) {
|
||||||
var userLevel = data.useragent.indexOf('Googlebot') > -1
|
var userLevel = data.useragent.indexOf('Googlebot') > -1
|
||||||
? 'Robot' : value;
|
? 'Robot' : Ox.toTitleCase(value);
|
||||||
return Ox.Theme.formatColorLevel(
|
return Ox.Theme.formatColorLevel(
|
||||||
userLevels.indexOf(userLevel),
|
userLevels.indexOf(userLevel),
|
||||||
userLevels,
|
userLevels,
|
||||||
|
|
Loading…
Reference in a new issue