document rightslevels

This commit is contained in:
j 2017-01-25 16:38:38 +01:00
parent ee4d00eaaf
commit 6e698cf32f
3 changed files with 30 additions and 2 deletions

View File

@ -350,6 +350,20 @@
}
],
/*
"documentRightsLevel" defines which initial rights level will be assigned to documents
created by users of these user levels.
*/
"documentRightsLevel": {"member": 0, "researcher": 0, "staff": 0, "admin": 0},
/*
"documentRightsLevels" is an ordered list of rights levels, one of which will be
assigned to each document.
*/
"documentRightsLevels": [
{"name": "Public", "color": [128, 255, 128]},
{"name": "Restricted", "color": [255, 212, 128]},
{"name": "Private", "color": [255, 128, 128]}
],
/*
"entities" can be used to store arbitrary data. They can be referenced in
annotations, info view, or elsewhere. Each entry defines a specific class
of entity object, its properties and their types (for example an "actor"

View File

@ -352,6 +352,20 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
}
],
/*
"documentRightsLevel" defines which initial rights level will be assigned to documents
created by users of these user levels.
*/
"documentRightsLevel": {"member": 0, "researcher": 0, "staff": 0, "admin": 0},
/*
"documentRightsLevels" is an ordered list of rights levels, one of which will be
assigned to each document.
*/
"documentRightsLevels": [
{"name": "Public", "color": [128, 255, 128]},
{"name": "Restricted", "color": [255, 212, 128]},
{"name": "Private", "color": [255, 128, 128]}
],
/*
"entities" can be used to store arbitrary data. They can be referenced in
annotations, info view, or elsewhere. Each entry defines a specific class
of entity object, its properties and their types (for example an "actor"

View File

@ -375,7 +375,7 @@ pandora.ui.documentInfoView = function(data) {
function getRightsLevelElement(rightsLevel) {
return Ox.Theme.formatColorLevel(
rightsLevel,
pandora.site.rightsLevels.map(function(rightsLevel) {
pandora.site.documentRightsLevels.map(function(rightsLevel) {
return rightsLevel.name;
})
);
@ -501,7 +501,7 @@ pandora.ui.documentInfoView = function(data) {
$rightsLevel.empty();
if (canEdit) {
$rightsLevelSelect = Ox.Select({
items: pandora.site.rightsLevels.map(function(rightsLevel, i) {
items: pandora.site.documentRightsLevels.map(function(rightsLevel, i) {
return {id: i, title: rightsLevel.name};
}),
width: 128,