- Issue created by @pdureau
- 🇫🇷France pdureau Paris
Jean's notes:
Have dynamic config available to the instanciation of display builder `stateManager::create()` and to the user using the display builder.
So config should be permission based. Each config have a `use` permission.Implementation
For each instance associated with entity / page / views we should store a default config, when using `stateManager::create()` with fallback to default.
This value is stored as `entity_config_id` on the storage, it's a default value for this display builder.Display builder UX
Have a switch of display builder config when on a display builder, only available the one with current user permission and default to the default one set in state storage `entity_config_id`.
- 🇫🇷France mogtofu33
DB config, one global permission 'administer display builders' to create / edit Delete
For each DB config, one usage permission (as filter module):
Use the %name Display builder config - 🇫🇷France pdureau Paris
Filter module permissions, for information:
administer filters: title: 'Administer text formats and filters' description: 'Define how text is handled by combining filters into text formats.' restrict access: true permission_callbacks: - Drupal\filter\FilterPermissions::permissions
- 🇫🇷France pdureau Paris
I start it, as a follow-up of 📌 Align config storage properties Active .
- Merge request !31Issue #3529129 by pdureau, mogtofu33: Availability according to roles or permissions → (Merged) created by pdureau
- 🇫🇷France pdureau Paris
What do you think about the logic in
ConfigFormTrait::buildConfigForm()
return match (count($options)) { 0 => [ '#type' => 'html_tag', '#tag' => 'p', '#value' => t('You are not allowed to use Display Builder.'), ], 1 => [ '#type' => 'hidden', '#default_value' => array_keys($options)[0], ], default => [ '#type' => 'select', '#title' => $this->t('Display builder config'), '#options' => $options, '#default_value' => $display_builder, ] };
It was not discussed.
- 🇫🇷France pdureau Paris
Jean's proposal:
return match (count($options)) { 0 => [ '#type' => 'hidden', '#default_value' => array_keys($options)[0], ], 1 => [ '#type' => 'hidden', '#default_value' => array_keys($options)[0], ], default => [ '#type' => 'select', '#title' => $this->t('Display builder config'), '#options' => $options, '#default_value' => $display_builder, ] };
-
mogtofu33 →
committed 9bf19497 on 1.0.x authored by
pdureau →
Issue #3529129 by pdureau, mogtofu33: Availability according to roles or...
-
mogtofu33 →
committed 9bf19497 on 1.0.x authored by
pdureau →