mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
wip: add permissions related fields in schema
Co-authored-by: David Larlet <david@larlet.fr>
This commit is contained in:
parent
77da6425c2
commit
172de0e2d0
2 changed files with 21 additions and 7 deletions
|
@ -118,6 +118,9 @@ export const SCHEMA = {
|
|||
default: false,
|
||||
label: translate('Animated transitions'),
|
||||
},
|
||||
edit_status: {
|
||||
type: Number,
|
||||
},
|
||||
editinosmControl: {
|
||||
type: Boolean,
|
||||
impacts: ['ui'],
|
||||
|
@ -125,6 +128,9 @@ export const SCHEMA = {
|
|||
label: translate('Display the control to open OpenStreetMap editor'),
|
||||
default: null,
|
||||
},
|
||||
editors: {
|
||||
type: Array,
|
||||
},
|
||||
embedControl: {
|
||||
type: Boolean,
|
||||
impacts: ['ui'],
|
||||
|
@ -362,6 +368,9 @@ export const SCHEMA = {
|
|||
type: Object,
|
||||
impacts: ['background'],
|
||||
},
|
||||
owner: {
|
||||
type: Object,
|
||||
},
|
||||
permanentCredit: {
|
||||
type: 'Text',
|
||||
impacts: ['ui'],
|
||||
|
@ -436,6 +445,9 @@ export const SCHEMA = {
|
|||
label: translate('Display the search control'),
|
||||
default: true,
|
||||
},
|
||||
share_status: {
|
||||
type: Number,
|
||||
},
|
||||
shortCredit: {
|
||||
type: String,
|
||||
impacts: ['ui'],
|
||||
|
@ -500,6 +512,9 @@ export const SCHEMA = {
|
|||
helpEntries: ['sync'],
|
||||
default: false,
|
||||
},
|
||||
team: {
|
||||
type: Object,
|
||||
},
|
||||
tilelayer: {
|
||||
type: Object,
|
||||
impacts: ['background'],
|
||||
|
@ -566,7 +581,6 @@ export const SCHEMA = {
|
|||
type: Object,
|
||||
impacts: ['data'],
|
||||
},
|
||||
|
||||
_referenceVersion: {
|
||||
type: Number,
|
||||
impacts: ['data'],
|
||||
|
|
|
@ -146,9 +146,9 @@ export class FeatureUpdater extends BaseUpdater {
|
|||
|
||||
export class MapPermissionsUpdater extends BaseUpdater {
|
||||
update({ key, value }) {
|
||||
this.updateObjectValue(this._umap.permissions, key, value)
|
||||
// if (fieldInSchema(key)) {
|
||||
// }
|
||||
if (fieldInSchema(key)) {
|
||||
this.updateObjectValue(this._umap.permissions, key, value)
|
||||
}
|
||||
}
|
||||
|
||||
getStoredObject(metadata) {
|
||||
|
@ -158,9 +158,9 @@ export class MapPermissionsUpdater extends BaseUpdater {
|
|||
|
||||
export class DataLayerPermissionsUpdater extends BaseUpdater {
|
||||
update({ key, value, metadata }) {
|
||||
this.updateObjectValue(this.getDataLayerFromID(metadata.id), key, value)
|
||||
// if (fieldInSchema(key)) {
|
||||
// }
|
||||
if (fieldInSchema(key)) {
|
||||
this.updateObjectValue(this.getDataLayerFromID(metadata.id), key, value)
|
||||
}
|
||||
}
|
||||
|
||||
getStoredObject(metadata) {
|
||||
|
|
Loading…
Reference in a new issue