fixes #2213, implements #2112

This commit is contained in:
Bachir Soussi Chiadmi 2023-05-03 15:10:59 +02:00
parent 1ffd995f0b
commit a799ce2446
7 changed files with 176 additions and 17 deletions

View File

@ -26,6 +26,7 @@
"drupal/core-composer-scaffold": "^9",
"drupal/core-project-message": "^9",
"drupal/core-recommended": "^9",
"drupal/entity_limit": "^2.0@alpha",
"drupal/flexible_permissions": "@beta",
"drupal/genpass": "^1.1",
"drupal/graphql": "4.x-dev@dev",

59
src/composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "f3baae79e847c753ab9ac766f4338529",
"content-hash": "f874a1a846eacffa0d31c1312d5e160a",
"packages": [
{
"name": "alchemy/zippy",
@ -5184,6 +5184,62 @@
"source": "https://git.drupalcode.org/project/entity_clone"
}
},
{
"name": "drupal/entity_limit",
"version": "2.0.0-alpha3",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/entity_limit.git",
"reference": "8.x-2.0-alpha3"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/entity_limit-8.x-2.0-alpha3.zip",
"reference": "8.x-2.0-alpha3",
"shasum": "a8f6150836414398a6c55d810b5c9afd723d645d"
},
"require": {
"drupal/core": "^8 || ^9"
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "8.x-2.0-alpha3",
"datestamp": "1667703283",
"security-coverage": {
"status": "not-covered",
"message": "Alpha releases are not covered by Drupal security advisories."
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "gaurav.goyal",
"homepage": "https://www.drupal.org/user/2497208"
},
{
"name": "purushotam.rai",
"homepage": "https://www.drupal.org/user/3193859"
},
{
"name": "vyasamit2007",
"homepage": "https://www.drupal.org/user/246119"
},
{
"name": "wasare",
"homepage": "https://www.drupal.org/user/18262"
}
],
"description": "Allow administrators to restrict the number of entities that may be created based on different conditions.",
"homepage": "https://www.drupal.org/project/entity_limit",
"support": {
"source": "https://git.drupalcode.org/project/entity_limit"
}
},
{
"name": "drupal/entity_reference_revisions",
"version": "1.10.0",
@ -14604,6 +14660,7 @@
"minimum-stability": "stable",
"stability-flags": {
"drupal/audiofield": 20,
"drupal/entity_limit": 15,
"drupal/flexible_permissions": 10,
"drupal/graphql": 20,
"drupal/group": 20,

View File

@ -51,6 +51,7 @@ module:
entity: 0
entity_browser: 0
entity_browser_enhanced: 0
entity_limit: 0
entity_reference_revisions: 0
field: 0
field_group: 0

View File

@ -0,0 +1,17 @@
uuid: 6df89594-cb4e-47b5-aba6-36de29c5b5e9
langcode: fr
status: true
dependencies: { }
id: concernement
label: concernement
weight: 0
plugin: role_limit
entity_type: node
entity_bundles:
concernement: concernement
entite: '0'
static: '0'
limits:
-
id: authenticated
limit: 1

View File

@ -0,0 +1,17 @@
uuid: 2aa643b1-1d91-4bc4-86f7-21bd98dd8835
langcode: fr
status: true
dependencies: { }
id: concernement_pour_admin_figuresl
label: 'concernement pour admin@figureslibres.io'
weight: 0
plugin: user_limit
entity_type: node
entity_bundles:
concernement: concernement
entite: '0'
static: '0'
limits:
-
id: '2'
limit: -1

View File

@ -2,10 +2,13 @@ uuid: f8555968-3235-4ab5-8996-bb5deea257b9
langcode: fr
status: true
dependencies:
config:
- field.storage.node.field_confidentialite
module:
- gnode
- group
- node
- options
_core:
default_config_hash: 50gd6UKSddlPxEUbaEG7l1ZHe5Akog488RFK-jAUkCM
id: group_nodes
@ -154,17 +157,80 @@ display:
multi_type: separator
separator: ', '
field_api_classes: false
status:
id: status
table: node_field_data
field: status
uid:
id: uid
table: group_relationship_field_data
field: uid
relationship: group_relationship
group_type: group
admin_label: ''
entity_type: group_relationship
entity_field: uid
plugin_id: field
label: 'Group relationship creator'
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: entity_reference_label
settings:
link: true
group_column: target_id
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
field_confidentialite:
id: field_confidentialite
table: node__field_confidentialite
field: field_confidentialite
relationship: none
group_type: group
admin_label: ''
entity_type: node
entity_field: status
plugin_id: field
label: Status
label: Confidentialité
exclude: false
alter:
alter_text: false
@ -206,11 +272,8 @@ display:
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: boolean
settings:
format: custom
format_custom_false: Unpublished
format_custom_true: Published
type: list_default
settings: { }
group_column: value
group_columns: { }
group_rows: true
@ -925,7 +988,8 @@ display:
- url.query_args
- user.group_permissions
- 'user.node_grants:view'
tags: { }
tags:
- 'config:field.storage.node.field_confidentialite'
page_1:
id: page_1
display_title: Page
@ -954,4 +1018,5 @@ display:
- url.query_args
- user.group_permissions
- 'user.node_grants:view'
tags: { }
tags:
- 'config:field.storage.node.field_confidentialite'

View File

@ -2,10 +2,11 @@ admin_menus.concernement_add:
route_name: node.add
route_parameters:
node_type: 'concernement'
title: 'Add Concernement'
title: 'Ajouter un concernement'
appears_on:
- view.admin_nodes.page_1
- view.user_contents.page_1
admin_menus.entite_add:
route_name: node.add
route_parameters: