wip: add permissions related fields in schema

Co-authored-by: David Larlet <david@larlet.fr>
This commit is contained in:
Yohan Boniface 2025-03-21 16:43:10 +01:00
parent 77da6425c2
commit 172de0e2d0
2 changed files with 21 additions and 7 deletions

View file

@ -118,6 +118,9 @@ export const SCHEMA = {
default: false, default: false,
label: translate('Animated transitions'), label: translate('Animated transitions'),
}, },
edit_status: {
type: Number,
},
editinosmControl: { editinosmControl: {
type: Boolean, type: Boolean,
impacts: ['ui'], impacts: ['ui'],
@ -125,6 +128,9 @@ export const SCHEMA = {
label: translate('Display the control to open OpenStreetMap editor'), label: translate('Display the control to open OpenStreetMap editor'),
default: null, default: null,
}, },
editors: {
type: Array,
},
embedControl: { embedControl: {
type: Boolean, type: Boolean,
impacts: ['ui'], impacts: ['ui'],
@ -362,6 +368,9 @@ export const SCHEMA = {
type: Object, type: Object,
impacts: ['background'], impacts: ['background'],
}, },
owner: {
type: Object,
},
permanentCredit: { permanentCredit: {
type: 'Text', type: 'Text',
impacts: ['ui'], impacts: ['ui'],
@ -436,6 +445,9 @@ export const SCHEMA = {
label: translate('Display the search control'), label: translate('Display the search control'),
default: true, default: true,
}, },
share_status: {
type: Number,
},
shortCredit: { shortCredit: {
type: String, type: String,
impacts: ['ui'], impacts: ['ui'],
@ -500,6 +512,9 @@ export const SCHEMA = {
helpEntries: ['sync'], helpEntries: ['sync'],
default: false, default: false,
}, },
team: {
type: Object,
},
tilelayer: { tilelayer: {
type: Object, type: Object,
impacts: ['background'], impacts: ['background'],
@ -566,7 +581,6 @@ export const SCHEMA = {
type: Object, type: Object,
impacts: ['data'], impacts: ['data'],
}, },
_referenceVersion: { _referenceVersion: {
type: Number, type: Number,
impacts: ['data'], impacts: ['data'],

View file

@ -146,9 +146,9 @@ export class FeatureUpdater extends BaseUpdater {
export class MapPermissionsUpdater extends BaseUpdater { export class MapPermissionsUpdater extends BaseUpdater {
update({ key, value }) { update({ key, value }) {
if (fieldInSchema(key)) {
this.updateObjectValue(this._umap.permissions, key, value) this.updateObjectValue(this._umap.permissions, key, value)
// if (fieldInSchema(key)) { }
// }
} }
getStoredObject(metadata) { getStoredObject(metadata) {
@ -158,9 +158,9 @@ export class MapPermissionsUpdater extends BaseUpdater {
export class DataLayerPermissionsUpdater extends BaseUpdater { export class DataLayerPermissionsUpdater extends BaseUpdater {
update({ key, value, metadata }) { update({ key, value, metadata }) {
if (fieldInSchema(key)) {
this.updateObjectValue(this.getDataLayerFromID(metadata.id), key, value) this.updateObjectValue(this.getDataLayerFromID(metadata.id), key, value)
// if (fieldInSchema(key)) { }
// }
} }
getStoredObject(metadata) { getStoredObject(metadata) {