From f523aa1b2535a087959fc2181db76a0d0701f27d Mon Sep 17 00:00:00 2001 From: bach Date: Mon, 7 Nov 2022 17:02:12 +0100 Subject: [PATCH] admin menu per admin | group admin | group member; ouatt_users curom module --- src/composer.json | 8 + src/composer.lock | 169 +++++++++--------- src/config/sync/amswap.amswapconfig.yml | 2 +- ...ty_form_display.group.bourgeon.default.yml | 52 +++--- ....entity_form_display.user.user.default.yml | 21 +++ ...re.entity_form_display.user.user.group.yml | 23 +++ .../sync/core.entity_form_mode.user.group.yml | 10 ++ src/config/sync/core.extension.yml | 1 + .../sync/group.role.bourgeon-member_indiv.yml | 2 + src/config/sync/structure_sync.data.yml | 50 +++++- src/config/sync/system.menu.group-admin.yml | 8 + src/config/sync/user.role.group_admin.yml | 1 - .../custom/ouatt_users/ouatt_users.info.yml | 8 + .../custom/ouatt_users/ouatt_users.module | 44 +++++ 14 files changed, 285 insertions(+), 114 deletions(-) create mode 100644 src/config/sync/core.entity_form_display.user.user.default.yml create mode 100644 src/config/sync/core.entity_form_display.user.user.group.yml create mode 100644 src/config/sync/core.entity_form_mode.user.group.yml create mode 100644 src/config/sync/system.menu.group-admin.yml create mode 100644 src/web/modules/custom/ouatt_users/ouatt_users.info.yml create mode 100644 src/web/modules/custom/ouatt_users/ouatt_users.module diff --git a/src/composer.json b/src/composer.json index 55f6fbd..6ccae57 100644 --- a/src/composer.json +++ b/src/composer.json @@ -115,6 +115,11 @@ "replace": false, "merge-extra": true }, + "disabled patches": { + "drupal/core": { + "Apply formatters and widgets to User base fields 'name' and 'email' https://www.drupal.org/project/drupal/issues/2227381": "https://www.drupal.org/files/issues/2022-01-28/2227381-91.patch" + } + }, "patches": { "drupal/paragraphs": { "Skip saving empty paragraphs for certain types https://www.drupal.org/project/paragraphs/issues/2877695" : "https://www.drupal.org/files/issues/2021-03-31/2877695-35.patch" @@ -124,6 +129,9 @@ }, "drupal/email_registration": { "Allow authentication via mail and password over RPC https://www.drupal.org/project/email_registration/issues/2856542": "https://www.drupal.org/files/issues/2021-06-11/2856542-13.patch" + }, + "drupal/group": { + "Empty page when trying to create group node https://www.drupal.org/project/group/issues/2842630": "https://www.drupal.org/files/issues/2022-09-02/group-2842630-40-v3.patch" } } } diff --git a/src/composer.lock b/src/composer.lock index 5d58fe8..9752ee4 100644 --- a/src/composer.lock +++ b/src/composer.lock @@ -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": "5365133aecbc598c646688e7709f48d0", + "content-hash": "b6a27e0ed9b777319e47f2ee08cba5ac", "packages": [ { "name": "alchemy/zippy", @@ -1493,16 +1493,16 @@ }, { "name": "doctrine/collections", - "version": "1.7.2", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/doctrine/collections.git", - "reference": "3fe77330f5591108bbf1315da7377a7e704ed8a0" + "reference": "2b44dd4cbca8b5744327de78bafef5945c7e7b5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/3fe77330f5591108bbf1315da7377a7e704ed8a0", - "reference": "3fe77330f5591108bbf1315da7377a7e704ed8a0", + "url": "https://api.github.com/repos/doctrine/collections/zipball/2b44dd4cbca8b5744327de78bafef5945c7e7b5e", + "reference": "2b44dd4cbca8b5744327de78bafef5945c7e7b5e", "shasum": "" }, "require": { @@ -1557,9 +1557,9 @@ ], "support": { "issues": "https://github.com/doctrine/collections/issues", - "source": "https://github.com/doctrine/collections/tree/1.7.2" + "source": "https://github.com/doctrine/collections/tree/1.8.0" }, - "time": "2022-08-27T16:08:58+00:00" + "time": "2022-09-01T20:12:10+00:00" }, { "name": "doctrine/common", @@ -1707,34 +1707,35 @@ }, { "name": "doctrine/event-manager", - "version": "1.1.2", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/event-manager.git", - "reference": "eb2ecf80e3093e8f3c2769ac838e27d8ede8e683" + "reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/eb2ecf80e3093e8f3c2769ac838e27d8ede8e683", - "reference": "eb2ecf80e3093e8f3c2769ac838e27d8ede8e683", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/95aa4cb529f1e96576f3fda9f5705ada4056a520", + "reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520", "shasum": "" }, "require": { + "doctrine/deprecations": "^0.5.3 || ^1", "php": "^7.1 || ^8.0" }, "conflict": { "doctrine/common": "<2.9" }, "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "~1.4.10 || ^1.5.4", + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "~1.4.10 || ^1.8.8", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" + "vimeo/psalm": "^4.24" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" + "Doctrine\\Common\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1778,7 +1779,7 @@ ], "support": { "issues": "https://github.com/doctrine/event-manager/issues", - "source": "https://github.com/doctrine/event-manager/tree/1.1.2" + "source": "https://github.com/doctrine/event-manager/tree/1.2.0" }, "funding": [ { @@ -1794,7 +1795,7 @@ "type": "tidelift" } ], - "time": "2022-07-27T22:18:11+00:00" + "time": "2022-10-12T20:51:15+00:00" }, { "name": "doctrine/inflector", @@ -5730,17 +5731,17 @@ }, { "name": "drupal/inline_entity_form", - "version": "1.0.0-rc12", + "version": "1.0.0-rc14", "source": { "type": "git", "url": "https://git.drupalcode.org/project/inline_entity_form.git", - "reference": "8.x-1.0-rc12" + "reference": "8.x-1.0-rc14" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/inline_entity_form-8.x-1.0-rc12.zip", - "reference": "8.x-1.0-rc12", - "shasum": "eddee2964823b7da2ec7032ddb871f247ba7ed7a" + "url": "https://ftp.drupal.org/files/projects/inline_entity_form-8.x-1.0-rc14.zip", + "reference": "8.x-1.0-rc14", + "shasum": "2c9efd73332acfba43fe9b29e78e508ddc9d3664" }, "require": { "drupal/core": "^8.8 || ^9 || ^10", @@ -5752,8 +5753,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.0-rc12", - "datestamp": "1658308069", + "version": "8.x-1.0-rc14", + "datestamp": "1663701306", "security-coverage": { "status": "not-covered", "message": "RC releases are not covered by Drupal security advisories." @@ -10896,16 +10897,16 @@ }, { "name": "symfony/console", - "version": "v4.4.45", + "version": "v4.4.48", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "28b77970939500fb04180166a1f716e75a871ef8" + "reference": "8e70c1cab07ac641b885ce80385b9824a293c623" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/28b77970939500fb04180166a1f716e75a871ef8", - "reference": "28b77970939500fb04180166a1f716e75a871ef8", + "url": "https://api.github.com/repos/symfony/console/zipball/8e70c1cab07ac641b885ce80385b9824a293c623", + "reference": "8e70c1cab07ac641b885ce80385b9824a293c623", "shasum": "" }, "require": { @@ -10966,7 +10967,7 @@ "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/console/tree/v4.4.45" + "source": "https://github.com/symfony/console/tree/v4.4.48" }, "funding": [ { @@ -10982,7 +10983,7 @@ "type": "tidelift" } ], - "time": "2022-08-17T14:50:19+00:00" + "time": "2022-10-26T16:02:45+00:00" }, { "name": "symfony/css-selector", @@ -11782,16 +11783,16 @@ }, { "name": "symfony/http-foundation", - "version": "v4.4.45", + "version": "v4.4.48", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "b2f2e3cb66349d89cb46c939cea03c62ad71cf00" + "reference": "cd4f478e67f7c8776a13b17e7d44241fd66261ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b2f2e3cb66349d89cb46c939cea03c62ad71cf00", - "reference": "b2f2e3cb66349d89cb46c939cea03c62ad71cf00", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/cd4f478e67f7c8776a13b17e7d44241fd66261ad", + "reference": "cd4f478e67f7c8776a13b17e7d44241fd66261ad", "shasum": "" }, "require": { @@ -11830,7 +11831,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v4.4.45" + "source": "https://github.com/symfony/http-foundation/tree/v4.4.48" }, "funding": [ { @@ -11846,20 +11847,20 @@ "type": "tidelift" } ], - "time": "2022-08-17T15:29:03+00:00" + "time": "2022-10-12T09:40:54+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.4.45", + "version": "v4.4.48", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "4f2d38e9a3c6997ea0886ede5aaf337dfd0fc938" + "reference": "a6d5229dd9466e046674baad8449ad92ee24eddd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/4f2d38e9a3c6997ea0886ede5aaf337dfd0fc938", - "reference": "4f2d38e9a3c6997ea0886ede5aaf337dfd0fc938", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a6d5229dd9466e046674baad8449ad92ee24eddd", + "reference": "a6d5229dd9466e046674baad8449ad92ee24eddd", "shasum": "" }, "require": { @@ -11934,7 +11935,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v4.4.45" + "source": "https://github.com/symfony/http-kernel/tree/v4.4.48" }, "funding": [ { @@ -11950,20 +11951,20 @@ "type": "tidelift" } ], - "time": "2022-08-26T14:34:48+00:00" + "time": "2022-10-28T16:49:22+00:00" }, { "name": "symfony/mime", - "version": "v5.4.12", + "version": "v5.4.13", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "03876e9c5a36f5b45e7d9a381edda5421eff8a90" + "reference": "bb2ccf759e2b967dcd11bdee5bdf30dddd2290bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/03876e9c5a36f5b45e7d9a381edda5421eff8a90", - "reference": "03876e9c5a36f5b45e7d9a381edda5421eff8a90", + "url": "https://api.github.com/repos/symfony/mime/zipball/bb2ccf759e2b967dcd11bdee5bdf30dddd2290bd", + "reference": "bb2ccf759e2b967dcd11bdee5bdf30dddd2290bd", "shasum": "" }, "require": { @@ -12017,7 +12018,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.12" + "source": "https://github.com/symfony/mime/tree/v5.4.13" }, "funding": [ { @@ -12033,7 +12034,7 @@ "type": "tidelift" } ], - "time": "2022-08-19T14:24:03+00:00" + "time": "2022-09-01T18:18:29+00:00" }, { "name": "symfony/polyfill-ctype", @@ -12835,16 +12836,16 @@ }, { "name": "symfony/psr-http-message-bridge", - "version": "v2.1.2", + "version": "v2.1.3", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "22b37c8a3f6b5d94e9cdbd88e1270d96e2f97b34" + "reference": "d444f85dddf65c7e57c58d8e5b3a4dbb593b1840" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/22b37c8a3f6b5d94e9cdbd88e1270d96e2f97b34", - "reference": "22b37c8a3f6b5d94e9cdbd88e1270d96e2f97b34", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/d444f85dddf65c7e57c58d8e5b3a4dbb593b1840", + "reference": "d444f85dddf65c7e57c58d8e5b3a4dbb593b1840", "shasum": "" }, "require": { @@ -12903,7 +12904,7 @@ ], "support": { "issues": "https://github.com/symfony/psr-http-message-bridge/issues", - "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.1.2" + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.1.3" }, "funding": [ { @@ -12919,7 +12920,7 @@ "type": "tidelift" } ], - "time": "2021-11-05T13:13:39+00:00" + "time": "2022-09-05T10:34:54+00:00" }, { "name": "symfony/routing", @@ -13012,16 +13013,16 @@ }, { "name": "symfony/serializer", - "version": "v4.4.45", + "version": "v4.4.47", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "d19621a350491f76e2faed2afb982e0706f63252" + "reference": "6e01d63c55657930a6de03d6e36aae50af98888d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/d19621a350491f76e2faed2afb982e0706f63252", - "reference": "d19621a350491f76e2faed2afb982e0706f63252", + "url": "https://api.github.com/repos/symfony/serializer/zipball/6e01d63c55657930a6de03d6e36aae50af98888d", + "reference": "6e01d63c55657930a6de03d6e36aae50af98888d", "shasum": "" }, "require": { @@ -13086,7 +13087,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v4.4.45" + "source": "https://github.com/symfony/serializer/tree/v4.4.47" }, "funding": [ { @@ -13102,7 +13103,7 @@ "type": "tidelift" } ], - "time": "2022-08-17T14:28:21+00:00" + "time": "2022-09-19T08:38:33+00:00" }, { "name": "symfony/service-contracts", @@ -13189,16 +13190,16 @@ }, { "name": "symfony/translation", - "version": "v4.4.45", + "version": "v4.4.47", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "4e6b4c0dbeb04d6f004ed7f43eb0905ce8396def" + "reference": "45036b1d53accc48fe9bab71ccd86d57eba0dd94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/4e6b4c0dbeb04d6f004ed7f43eb0905ce8396def", - "reference": "4e6b4c0dbeb04d6f004ed7f43eb0905ce8396def", + "url": "https://api.github.com/repos/symfony/translation/zipball/45036b1d53accc48fe9bab71ccd86d57eba0dd94", + "reference": "45036b1d53accc48fe9bab71ccd86d57eba0dd94", "shasum": "" }, "require": { @@ -13258,7 +13259,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v4.4.45" + "source": "https://github.com/symfony/translation/tree/v4.4.47" }, "funding": [ { @@ -13274,7 +13275,7 @@ "type": "tidelift" } ], - "time": "2022-08-02T12:44:49+00:00" + "time": "2022-10-03T15:15:11+00:00" }, { "name": "symfony/translation-contracts", @@ -13356,16 +13357,16 @@ }, { "name": "symfony/validator", - "version": "v4.4.45", + "version": "v4.4.48", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "06db9bfca8fefea4dfe8e804bbcd0aa79a414d0c" + "reference": "54781a4c41efbd283b779110bf8ae7f263737775" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/06db9bfca8fefea4dfe8e804bbcd0aa79a414d0c", - "reference": "06db9bfca8fefea4dfe8e804bbcd0aa79a414d0c", + "url": "https://api.github.com/repos/symfony/validator/zipball/54781a4c41efbd283b779110bf8ae7f263737775", + "reference": "54781a4c41efbd283b779110bf8ae7f263737775", "shasum": "" }, "require": { @@ -13442,7 +13443,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v4.4.45" + "source": "https://github.com/symfony/validator/tree/v4.4.48" }, "funding": [ { @@ -13458,20 +13459,20 @@ "type": "tidelift" } ], - "time": "2022-08-04T16:19:35+00:00" + "time": "2022-10-25T13:54:11+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.4.11", + "version": "v5.4.14", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861" + "reference": "6894d06145fefebd9a4c7272baa026a1c394a430" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b8f306d7b8ef34fb3db3305be97ba8e088fb4861", - "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/6894d06145fefebd9a4c7272baa026a1c394a430", + "reference": "6894d06145fefebd9a4c7272baa026a1c394a430", "shasum": "" }, "require": { @@ -13531,7 +13532,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.11" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.14" }, "funding": [ { @@ -13547,7 +13548,7 @@ "type": "tidelift" } ], - "time": "2022-07-20T13:00:38+00:00" + "time": "2022-10-07T08:01:20+00:00" }, { "name": "symfony/yaml", @@ -13622,16 +13623,16 @@ }, { "name": "twig/twig", - "version": "v2.15.2", + "version": "v2.15.3", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "3e43405a9a8b578809426339cc3780e16fba0c52" + "reference": "ab402673db8746cb3a4c46f3869d6253699f614a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/3e43405a9a8b578809426339cc3780e16fba0c52", - "reference": "3e43405a9a8b578809426339cc3780e16fba0c52", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/ab402673db8746cb3a4c46f3869d6253699f614a", + "reference": "ab402673db8746cb3a4c46f3869d6253699f614a", "shasum": "" }, "require": { @@ -13686,7 +13687,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v2.15.2" + "source": "https://github.com/twigphp/Twig/tree/v2.15.3" }, "funding": [ { @@ -13698,7 +13699,7 @@ "type": "tidelift" } ], - "time": "2022-08-12T06:43:37+00:00" + "time": "2022-09-28T08:40:08+00:00" }, { "name": "typo3/phar-stream-wrapper", diff --git a/src/config/sync/amswap.amswapconfig.yml b/src/config/sync/amswap.amswapconfig.yml index 9490feb..edbe8bb 100644 --- a/src/config/sync/amswap.amswapconfig.yml +++ b/src/config/sync/amswap.amswapconfig.yml @@ -7,7 +7,7 @@ role_menu_pairs: menu: administrator - role: group_admin - menu: administrator + menu: group-admin - role: group_member menu: administrator diff --git a/src/config/sync/core.entity_form_display.group.bourgeon.default.yml b/src/config/sync/core.entity_form_display.group.bourgeon.default.yml index a727e46..35d8aa4 100644 --- a/src/config/sync/core.entity_form_display.group.bourgeon.default.yml +++ b/src/config/sync/core.entity_form_display.group.bourgeon.default.yml @@ -6,8 +6,26 @@ dependencies: - field.field.group.bourgeon.field_description - group.type.bourgeon module: - - path + - field_group - text +third_party_settings: + field_group: + group_details: + children: + - status + label: Details + region: content + parent_name: '' + weight: 3 + format_type: details_sidebar + format_settings: + classes: '' + show_empty_fields: true + id: '' + open: true + description: '' + required_fields: true + weight: 0 id: group.bourgeon.default targetEntityType: group bundle: bourgeon @@ -15,7 +33,7 @@ mode: default content: field_description: type: text_textarea_with_summary - weight: 4 + weight: 1 region: content settings: rows: 9 @@ -31,34 +49,14 @@ content: size: 60 placeholder: '' third_party_settings: { } - langcode: - type: language_select - weight: 1 - region: content - settings: - include_locked: true - third_party_settings: { } - path: - type: path - weight: 2 - region: content - settings: { } - third_party_settings: { } status: type: boolean_checkbox - weight: 3 + weight: 2 region: content settings: display_label: true third_party_settings: { } - uid: - type: entity_reference_autocomplete - weight: 5 - region: content - settings: - match_operator: CONTAINS - match_limit: 10 - size: 60 - placeholder: '' - third_party_settings: { } -hidden: { } +hidden: + langcode: true + path: true + uid: true diff --git a/src/config/sync/core.entity_form_display.user.user.default.yml b/src/config/sync/core.entity_form_display.user.user.default.yml new file mode 100644 index 0000000..82e40de --- /dev/null +++ b/src/config/sync/core.entity_form_display.user.user.default.yml @@ -0,0 +1,21 @@ +uuid: 2831e53a-5b05-4e79-bd7c-9f796f246b67 +langcode: fr +status: true +dependencies: + module: + - user +id: user.user.default +targetEntityType: user +bundle: user +mode: default +content: + account: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + contact: true + langcode: true + language: true + path: true diff --git a/src/config/sync/core.entity_form_display.user.user.group.yml b/src/config/sync/core.entity_form_display.user.user.group.yml new file mode 100644 index 0000000..6c9cb6a --- /dev/null +++ b/src/config/sync/core.entity_form_display.user.user.group.yml @@ -0,0 +1,23 @@ +uuid: 613e48fc-ab30-407f-a15d-42e81751673d +langcode: fr +status: true +dependencies: + config: + - core.entity_form_mode.user.group + module: + - user +id: user.user.group +targetEntityType: user +bundle: user +mode: group +content: + account: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + contact: true + langcode: true + language: true + path: true diff --git a/src/config/sync/core.entity_form_mode.user.group.yml b/src/config/sync/core.entity_form_mode.user.group.yml new file mode 100644 index 0000000..743b5bc --- /dev/null +++ b/src/config/sync/core.entity_form_mode.user.group.yml @@ -0,0 +1,10 @@ +uuid: 61e96dfa-5a17-4092-a200-7b5f1bc2b273 +langcode: fr +status: true +dependencies: + module: + - user +id: user.group +label: Group +targetEntityType: user +cache: true diff --git a/src/config/sync/core.extension.yml b/src/config/sync/core.extension.yml index 68d77cf..c0d7a40 100644 --- a/src/config/sync/core.extension.yml +++ b/src/config/sync/core.extension.yml @@ -86,6 +86,7 @@ module: node: 0 options: 0 ouatt_graphql: 0 + ouatt_users: 0 page_cache: 0 pagerer: 0 path: 0 diff --git a/src/config/sync/group.role.bourgeon-member_indiv.yml b/src/config/sync/group.role.bourgeon-member_indiv.yml index 4cc54d8..6537465 100644 --- a/src/config/sync/group.role.bourgeon-member_indiv.yml +++ b/src/config/sync/group.role.bourgeon-member_indiv.yml @@ -18,3 +18,5 @@ permissions: - 'view group_node:concernement entity' - 'create group_node:entite entity' - 'view unpublished group_node:entite entity' + - 'update own group_node:concernement entity' + - 'update own group_node:entite entity' diff --git a/src/config/sync/structure_sync.data.yml b/src/config/sync/structure_sync.data.yml index d9f3f5f..d12f582 100644 --- a/src/config/sync/structure_sync.data.yml +++ b/src/config/sync/structure_sync.data.yml @@ -1,2 +1,50 @@ -menus: { } +menus: + - + menu_name: group-admin + title: Bourgeons + parent: null + uri: 'internal:/admin/group' + link_title: '' + description: null + enabled: true + expanded: false + weight: 0 + langcode: fr + uuid: acb85cbe-f9e6-4b37-945c-be4a2661ec0f + - + menu_name: group-admin + title: 'Create User' + parent: null + uri: 'internal:/admin/people/create' + link_title: '' + description: null + enabled: true + expanded: false + weight: 1 + langcode: fr + uuid: 52ec0062-b1c9-45be-a346-1b4907b7dea0 + - + menu_name: administrator + title: Groups + parent: null + uri: 'http://dev.ouatterrir.fr/api/admin/group' + link_title: '' + description: null + enabled: true + expanded: false + weight: 1 + langcode: fr + uuid: a9498617-648c-47d2-89d3-bc25c02d2a09 + - + menu_name: administrator + title: Users + parent: null + uri: 'internal:/admin/people' + link_title: '' + description: null + enabled: true + expanded: false + weight: 2 + langcode: fr + uuid: a6e17ef7-58a7-430b-9a82-c7af480a2870 log: 1 diff --git a/src/config/sync/system.menu.group-admin.yml b/src/config/sync/system.menu.group-admin.yml new file mode 100644 index 0000000..ca42d11 --- /dev/null +++ b/src/config/sync/system.menu.group-admin.yml @@ -0,0 +1,8 @@ +uuid: 26b3c196-61b4-4513-a8bf-41550471270a +langcode: und +status: true +dependencies: { } +id: group-admin +label: 'group admin' +description: '' +locked: false diff --git a/src/config/sync/user.role.group_admin.yml b/src/config/sync/user.role.group_admin.yml index 7c4bf13..0afe464 100644 --- a/src/config/sync/user.role.group_admin.yml +++ b/src/config/sync/user.role.group_admin.yml @@ -18,7 +18,6 @@ is_admin: null permissions: - 'access administration pages' - 'access toolbar' - - 'access users overview' - 'assign group_member role' - 'cancel users with role group_member' - 'create concernement content' diff --git a/src/web/modules/custom/ouatt_users/ouatt_users.info.yml b/src/web/modules/custom/ouatt_users/ouatt_users.info.yml new file mode 100644 index 0000000..57b165f --- /dev/null +++ b/src/web/modules/custom/ouatt_users/ouatt_users.info.yml @@ -0,0 +1,8 @@ +name: Où Atterrir Users +type: module +description: 'Où Atterrir Users.' +package: Ouatterrir +core: 8.x +# dependencies: +# - user +core_version_requirement: ^8 || ^9 diff --git a/src/web/modules/custom/ouatt_users/ouatt_users.module b/src/web/modules/custom/ouatt_users/ouatt_users.module new file mode 100644 index 0000000..8dbfa46 --- /dev/null +++ b/src/web/modules/custom/ouatt_users/ouatt_users.module @@ -0,0 +1,44 @@ +' . t('About') . ''; + $output .= '

' . t('Où Atterrir users twicks module') . '

'; + return $output; + + default: + } +} + + +/** + * Implements hook_form_FORM_ID_alter(). + */ +function ouatt_users_form_user_register_form_alter(&$form, $form_state, $form_id) { + $curuser = \Drupal::currentUser(); + $curroles = $curuser->getRoles(); + if ( in_array('group_admin', $curroles) && !in_array(['admin', 'root'], $curroles) ){ + // role. Group admin can only create "groupe member" user + $form['role_change']['widget']['#default_value'] = ['group_member']; + $form['role_change']['#disabled'] = true; + $form['role_change']['#attributes']['class'][] = 'js-hide'; + // status. Always active + $form['account']['status']['#default_value'] = 1; + $form['account']['status']['#disabled'] = true; + $form['account']['status']['#attributes']['class'][] = 'js-hide'; + } + +} \ No newline at end of file