Skip to content
Snippets Groups Projects
Commit 9e597c47 authored by Naveen Valecha's avatar Naveen Valecha Committed by Kristiaan Van den Eynde
Browse files

Issue #3399569 by kristiaanvandeneynde, naveenvalecha, zniki.ru: Adopt GitLab CI

parent 64801148
No related branches found
No related tags found
2 merge requests!130Issue #2876696 by jhedstrom, jaapjan, msnassar, _dcre_, dan2k3k4,...,!128Issue #2876696 by jhedstrom, jaapjan, msnassar, _dcre_, dan2k3k4,...
Pipeline #60530 canceled
Showing
with 380 additions and 36 deletions
# Not copying all comments from template, original found here:
# https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/gitlab-ci/template.gitlab-ci.yml
include:
- project: $_GITLAB_TEMPLATES_REPO
ref: $_GITLAB_TEMPLATES_REF
file:
- '/includes/include.drupalci.main.yml'
- '/includes/include.drupalci.variables.yml'
- '/includes/include.drupalci.workflows.yml'
variables:
SKIP_ESLINT: '1'
OPT_IN_TEST_MAX_PHP: '1'
OPT_IN_TEST_NEXT_MINOR: '1'
......@@ -20,5 +20,8 @@
"drupal/core": "^9.5 || ^10",
"drupal/entity": "^1.2",
"drupal/flexible_permissions": "^1.0"
},
"require-dev": {
"jangregor/phpstan-prophecy": "^1.0"
}
}
......@@ -7,17 +7,17 @@
font-weight: bold;
}
.permissions .section {
font-style: italic;
padding-left: 1.5em; /* LTR */
font-style: italic;
}
[dir="rtl"] .permissions .section {
padding-left: 0;
padding-right: 1.5em;
padding-left: 0;
}
.permissions .permission {
padding-left: 2.5em; /* LTR */
}
[dir="rtl"] .permissions .permission {
padding-left: 0;
padding-right: 2.5em;
padding-left: 0;
}
/**
* Main menu icons.
*/
.toolbar-icon-system-admin-group:before {
.toolbar-icon-system-admin-group::before {
background-image: url(../images/icons/787878/toolbar.svg);
}
.toolbar-icon-system-admin-group:active:before,
.toolbar-icon-system-admin-group.is-active:before {
.toolbar-icon-system-admin-group:active::before,
.toolbar-icon-system-admin-group.is-active::before {
background-image: url(../images/icons/000000/toolbar.svg);
}
......@@ -5,7 +5,6 @@
* Hooks specific to the Group module.
*/
use Drupal\Core\Session\AccountInterface;
use Drupal\group\Entity\GroupInterface;
/**
......@@ -18,7 +17,7 @@ use Drupal\group\Entity\GroupInterface;
*
* @param array $operations
* A list of links to be set in an 'operations' element.
* @param GroupInterface $group
* @param \Drupal\group\Entity\GroupInterface $group
* The group to alter the operations for.
*
* @see \Drupal\group\Plugin\Block\GroupOperationsBlock
......
......@@ -10,6 +10,7 @@ use Drupal\Core\Access\AccessResult;
use Drupal\Core\Config\Entity\ConfigEntityInterface;
use Drupal\Core\Database\Query\AlterableInterface;
use Drupal\Core\Database\Query\SelectInterface;
use Drupal\Core\Entity\EntityFormInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldItemListInterface;
......@@ -17,14 +18,14 @@ use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\group\Entity\GroupRelationshipInterface;
use Drupal\group\Entity\GroupInterface;
use Drupal\group\Entity\GroupRelationshipInterface;
use Drupal\group\Entity\Storage\ConfigWrapperStorageInterface;
use Drupal\group\Entity\Storage\GroupRelationshipStorageInterface;
use Drupal\group\Entity\Storage\GroupRoleStorageInterface;
use Drupal\group\QueryAccess\EntityQueryAlter;
use Drupal\group\QueryAccess\GroupRelationshipQueryAlter;
use Drupal\group\QueryAccess\GroupQueryAlter;
use Drupal\group\QueryAccess\GroupRelationshipQueryAlter;
use Drupal\views\Plugin\views\query\QueryPluginBase;
use Drupal\views\Plugin\views\query\Sql;
use Drupal\views\ViewExecutable;
......@@ -169,7 +170,7 @@ function group_theme_suggestions_group_relationship(array $variables) {
/**
* Prepares variables for the group template.
*
* Default template: group.html.twig
* Default template: group.html.twig.
*
* @param array $variables
* - elements: An array of elements to display in view mode.
......@@ -214,7 +215,7 @@ function template_preprocess_group(&$variables) {
/**
* Prepares variables for the group relationship template.
*
* Default template: group-relationship.html.twig
* Default template: group-relationship.html.twig.
*
* @param array $variables
* - elements: An array of elements to display in view mode.
......@@ -267,10 +268,6 @@ function group_modules_installed($modules) {
/**
* Implements hook_form_FORM_ID_alter().
*
* @param array $form
* @param \Drupal\Core\Form\FormStateInterface $form_state
* @param string $form_id
*/
function group_form_block_form_alter(&$form, FormStateInterface $form_state, $form_id) {
if (isset($form['visibility']['group_type'])) {
......@@ -684,12 +681,13 @@ function group_form_alter(&$form, FormStateInterface $form_state, $form_id) {
* @see \Drupal\group\Entity\Controller\GroupRelationshipController::createForm()
*/
function group_relationship_wizard_store($form, FormStateInterface $form_state) {
$entity = $form_state->getFormObject()->getEntity();
$form_object = $form_state->getFormObject();
assert($form_object instanceof EntityFormInterface);
// Store the unsaved entity in the temp store.
$store = \Drupal::service('tempstore.private')->get($form_state->get('group_wizard_id'));
$store_id = $form_state->get('store_id');
$store->set("$store_id:entity", $entity);
$store->set("$store_id:entity", $form_object->getEntity());
$store->set("$store_id:step", 2);
// Disable any URL-based redirect until the final step.
......@@ -724,7 +722,10 @@ function group_relationship_wizard_cancel($form, FormStateInterface $form_state)
* @see \Drupal\group\Entity\Controller\GroupRelationshipController::createForm()
*/
function group_relationship_entity_submit($form, FormStateInterface $form_state) {
$entity = $form_state->getFormObject()->getEntity();
$form_object = $form_state->getFormObject();
assert($form_object instanceof EntityFormInterface);
$entity = $form_object->getEntity();
$group = $form_state->get('group');
assert($group instanceof GroupInterface);
$group->addRelationship($entity, $form_state->get('group_relation'));
......
......@@ -7,6 +7,7 @@
use Drupal\Core\Config\ExtensionInstallStorage;
use Drupal\Core\Config\InstallStorage;
use Drupal\Core\Config\StorageInterface;
/**
* Update the group nodes view to use the argument provided title.
......@@ -68,7 +69,10 @@ function gnode_update_8003() {
// Get the storage for optional extension configuration.
$optional_storage = new ExtensionInstallStorage(
\Drupal::service('config.storage'),
InstallStorage::CONFIG_OPTIONAL_DIRECTORY
InstallStorage::CONFIG_OPTIONAL_DIRECTORY,
StorageInterface::DEFAULT_COLLECTION,
FALSE,
\Drupal::installProfile()
);
// Read the data from the YAML file and save it to the view.
......
......@@ -2,8 +2,8 @@
namespace Drupal\gnode\Plugin\Group\Relation;
use Drupal\group\Plugin\Group\Relation\GroupRelationBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\group\Plugin\Group\Relation\GroupRelationBase;
/**
* Provides a group relation type for nodes.
......
......@@ -2,14 +2,17 @@
namespace Drupal\gnode\Plugin\Group\Relation;
use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\group\Plugin\Group\Relation\GroupRelationTypeInterface;
use Drupal\node\Entity\NodeType;
use Drupal\Component\Plugin\Derivative\DeriverBase;
/**
* Derives plugins based on node type.
*/
class GroupNodeDeriver extends DeriverBase {
/**
* {@inheritdoc}.
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
assert($base_plugin_definition instanceof GroupRelationTypeInterface);
......
......@@ -4,7 +4,6 @@ namespace Drupal\gnode\Plugin\Group\RelationHandler;
use Drupal\group\Plugin\Group\RelationHandler\PermissionProviderInterface;
use Drupal\group\Plugin\Group\RelationHandler\PermissionProviderTrait;
use Drupal\group\Plugin\Group\RelationHandler\RelationHandlerTrait;
/**
* Provides group permissions for the group_node relation plugin.
......
......@@ -32,7 +32,7 @@ class EntityOperationsTest extends GroupEntityOperationsTest {
['group/1/nodes' => 'Nodes'],
[
'view group',
'access group_node overview'
'access group_node overview',
],
];
......@@ -41,7 +41,7 @@ class EntityOperationsTest extends GroupEntityOperationsTest {
[],
[
'view group',
'access group_node overview'
'access group_node overview',
],
['views'],
];
......
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="drupal-project">
<description>Default PHP CodeSniffer configuration for Drupal project.</description>
<rule ref="vendor/drupal/coder/coder_sniffer/Drupal/ruleset.xml">
<exclude name="Drupal.Semantics.FunctionT.NotLiteralString"/>
<exclude-pattern>./src/ProxyClass/UninstallValidator/GroupRelationshipUninstallValidator</exclude-pattern>
</rule>
<rule ref="Drupal.NamingConventions.ValidVariableName.LowerCamelName">
<exclude-pattern>./src/Plugin/Group/Relation/GroupRelationType</exclude-pattern>
</rule>
<exclude-pattern>/.ddev</exclude-pattern>
<exclude-pattern>/.lando</exclude-pattern>
<!-- https://www.drupal.org/drupalorg/docs/drupal-ci/using-coderphpcs-in-drupalci -->
<arg name="extensions" value="php,inc,module,install,info,test,profile,theme"/>
</ruleset>
parameters:
ignoreErrors:
-
message: "#^Access to an undefined property Drupal\\\\Core\\\\Session\\\\AccountInterface\\:\\:\\$original\\.$#"
count: 1
path: group.module
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Annotation\\\\Translation\\:\\:getArguments\\(\\)\\.$#"
count: 1
path: src/Access/GroupPermissionHandler.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Annotation\\\\Translation\\:\\:getUntranslatedString\\(\\)\\.$#"
count: 1
path: src/Access/GroupPermissionHandler.php
-
message: "#^Call to an undefined method Drupal\\\\flexible_permissions\\\\CalculatedPermissionsInterface\\:\\:addCacheTags\\(\\)\\.$#"
count: 1
path: src/Access/IndividualGroupPermissionCalculator.php
-
message: "#^Call to an undefined method Drupal\\\\flexible_permissions\\\\CalculatedPermissionsInterface\\:\\:addCacheableDependency\\(\\)\\.$#"
count: 2
path: src/Access/IndividualGroupPermissionCalculator.php
-
message: "#^Call to an undefined method Drupal\\\\flexible_permissions\\\\CalculatedPermissionsInterface\\:\\:addItem\\(\\)\\.$#"
count: 1
path: src/Access/IndividualGroupPermissionCalculator.php
-
message: "#^Call to an undefined method Drupal\\\\flexible_permissions\\\\CalculatedPermissionsInterface\\:\\:addCacheTags\\(\\)\\.$#"
count: 1
path: src/Access/SynchronizedGroupPermissionCalculator.php
-
message: "#^Call to an undefined method Drupal\\\\flexible_permissions\\\\CalculatedPermissionsInterface\\:\\:addCacheableDependency\\(\\)\\.$#"
count: 1
path: src/Access/SynchronizedGroupPermissionCalculator.php
-
message: "#^Call to an undefined method Drupal\\\\flexible_permissions\\\\CalculatedPermissionsInterface\\:\\:addItem\\(\\)\\.$#"
count: 1
path: src/Access/SynchronizedGroupPermissionCalculator.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Access\\\\AccessResultInterface\\:\\:addCacheableDependency\\(\\)\\.$#"
count: 1
path: src/Entity/Access/GroupAccessControlHandler.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Access\\\\AccessResultInterface\\:\\:addCacheableDependency\\(\\)\\.$#"
count: 1
path: src/Entity/Access/GroupRelationshipTypeAccessControlHandler.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Access\\\\AccessResultInterface\\:\\:addCacheableDependency\\(\\)\\.$#"
count: 1
path: src/Entity/Access/GroupRoleAccessControlHandler.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Access\\\\AccessResultInterface\\:\\:addCacheableDependency\\(\\)\\.$#"
count: 1
path: src/Entity/Access/GroupTypeAccessControlHandler.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Field\\\\FieldDefinitionInterface\\:\\:setSetting\\(\\)\\.$#"
count: 1
path: src/Entity/ConfigWrapper.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Routing\\\\RedirectDestinationInterface\\:\\:getDefinition\\(\\)\\.$#"
count: 1
path: src/Entity/Controller/GroupRelationshipListBuilder.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\ContentEntityInterface\\|Drupal\\\\Core\\\\Entity\\\\RevisionLogInterface\\:\\:getGroupType\\(\\)\\.$#"
count: 1
path: src/Entity/Form/GroupForm.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:getGroup\\(\\)\\.$#"
count: 1
path: src/Entity/Form/GroupRelationshipForm.php
-
message: """
#^Call to deprecated method deleteRevision\\(\\) of class Drupal\\\\Core\\\\Entity\\\\EntityStorageInterface\\:
in drupal\\:10\\.1\\.0 and is removed from drupal\\:11\\.0\\.0\\. Use
\\\\Drupal\\\\Core\\\\Entity\\\\RevisionableStorageInterface\\:\\:deleteRevision instead\\.$#
"""
count: 1
path: src/Entity/Form/GroupRevisionDeleteForm.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:setChangedTime\\(\\)\\.$#"
count: 1
path: src/Entity/Form/GroupRevisionRevertForm.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:setRevisionCreationTime\\(\\)\\.$#"
count: 1
path: src/Entity/Form/GroupRevisionRevertForm.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:setRevisionUserId\\(\\)\\.$#"
count: 1
path: src/Entity/Form/GroupRevisionRevertForm.php
-
message: "#^Access to an undefined property Drupal\\\\Core\\\\Entity\\\\ContentEntityInterface\\:\\:\\$revision_log_message\\.$#"
count: 1
path: src/Entity/Group.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:getRelationships\\(\\)\\.$#"
count: 1
path: src/Entity/Group.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Field\\\\FieldDefinitionInterface\\:\\:setDisplayOptions\\(\\)\\.$#"
count: 1
path: src/Entity/Group.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Field\\\\FieldDefinitionInterface\\:\\:setLabel\\(\\)\\.$#"
count: 1
path: src/Entity/Group.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\TypedData\\\\DataDefinitionInterface\\:\\:setClass\\(\\)\\.$#"
count: 1
path: src/Entity/Group.php
-
message: "#^Access to an undefined property Drupal\\\\Core\\\\Entity\\\\ContentEntityInterface\\:\\:\\$group_roles\\.$#"
count: 1
path: src/Entity/GroupRelationship.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:getConfigEntity\\(\\)\\.$#"
count: 1
path: src/Entity/GroupRelationship.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:getConfigEntityId\\(\\)\\.$#"
count: 1
path: src/Entity/GroupRelationship.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Field\\\\FieldDefinitionInterface\\:\\:setLabel\\(\\)\\.$#"
count: 1
path: src/Entity/GroupRelationship.php
-
message: "#^Call to an undefined method Drupal\\\\group\\\\Plugin\\\\Group\\\\Relation\\\\GroupRelationInterface\\:\\:getPluginDefinition\\(\\)\\.$#"
count: 1
path: src/Entity/GroupRelationshipType.php
-
message: "#^Access to an undefined property Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:\\$weight\\.$#"
count: 1
path: src/Entity/GroupRole.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:getPluginId\\(\\)\\.$#"
count: 1
path: src/Entity/Storage/GroupRelationshipStorage.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:getGroup\\(\\)\\.$#"
count: 1
path: src/Form/GroupLeaveForm.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:getOwnerId\\(\\)\\.$#"
count: 1
path: src/Plugin/Group/RelationHandlerDefault/AccessControl.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:isPublished\\(\\)\\.$#"
count: 1
path: src/Plugin/Group/RelationHandlerDefault/AccessControl.php
-
message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\EntityStorageInterface\\:\\:loadByEntity\\(\\)\\.$#"
count: 1
path: src/Plugin/Group/RelationHandlerDefault/AccessControl.php
-
message: "#^Variable \\$group_relationship in isset\\(\\) always exists and is not nullable\\.$#"
count: 1
path: src/Plugin/Validation/Constraint/GroupRelationshipCardinalityValidator.php
-
message: "#^Variable \\$group_role in isset\\(\\) always exists and is not nullable\\.$#"
count: 1
path: src/Plugin/Validation/Constraint/GroupRoleScopeValidator.php
-
message: "#^Call to an undefined method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:addRelationship\\(\\)\\.$#"
count: 1
path: src/Plugin/views/relationship/GroupRelationshipToEntityBase.php
-
message: "#^Call to an undefined method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:addTag\\(\\)\\.$#"
count: 1
path: src/Plugin/views/relationship/GroupRelationshipToEntityBase.php
-
message: "#^Call to an undefined method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:addRelationship\\(\\)\\.$#"
count: 1
path: src/Plugin/views/relationship/GroupToGroupRelationship.php
-
message: "#^Call to an undefined method Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:addTag\\(\\)\\.$#"
count: 1
path: src/Plugin/views/relationship/GroupToGroupRelationship.php
-
message: "#^Variable \\$any_unpublished_permission might not be defined\\.$#"
count: 1
path: src/QueryAccess/EntityQueryAlter.php
-
message: "#^Variable \\$data_table might not be defined\\.$#"
count: 3
path: src/QueryAccess/EntityQueryAlter.php
-
message: "#^Variable \\$own_unpublished_permission might not be defined\\.$#"
count: 1
path: src/QueryAccess/EntityQueryAlter.php
-
message: "#^Access to an undefined property Drupal\\\\Tests\\\\group\\\\Kernel\\\\QueryAlter\\\\QueryAlterTangibleTest\\:\\:\\$accessControlHandler\\.$#"
count: 1
path: tests/src/Kernel/QueryAlter/QueryAlterTangibleTest.php
-
message: "#^Access to an undefined property Drupal\\\\Tests\\\\group\\\\Kernel\\\\QueryAlter\\\\QueryAlterTangibleTest\\:\\:\\$storage\\.$#"
count: 3
path: tests/src/Kernel/QueryAlter/QueryAlterTangibleTest.php
-
message: "#^Variable \\$owner_conditions might not be defined\\.$#"
count: 3
path: tests/src/Kernel/QueryAlter/QueryAlterTestBase.php
-
message: "#^Variable \\$unpub_permissions might not be defined\\.$#"
count: 8
path: tests/src/Kernel/QueryAlter/QueryAlterTestBase.php
-
message: """
#^Call to deprecated method loadRevision\\(\\) of class Drupal\\\\Core\\\\Entity\\\\EntityStorageInterface\\:
in drupal\\:10\\.1\\.0 and is removed from drupal\\:11\\.0\\.0\\. Use
\\\\Drupal\\\\Core\\\\Entity\\\\RevisionableStorageInterface\\:\\:loadRevision instead\\.$#
"""
count: 1
path: tests/src/Kernel/RevisionUiAccessTest.php
-
message: "#^Plugin definitions cannot be altered\\.$#"
count: 1
path: tests/src/Unit/GroupRelationTypeManagerTest.php
includes:
- phpstan-baseline.neon
parameters:
level: 2
ignoreErrors:
# new static() is a best practice in Drupal, so we cannot fix that.
- "#^Unsafe usage of new static#"
# Ignore common errors for now.
- "#Drupal calls should be avoided in classes, use dependency injection instead#"
# Can only remove use of membership loader in 4.0.0
- "#^Fetching class constant class of deprecated class Drupal\\\\group\\\\GroupMembership\\:#"
- "#^Fetching class constant class of deprecated class Drupal\\\\group\\\\GroupMembershipLoaderInterface\\:#"
- "#has typehint with deprecated class Drupal\\\\group\\\\GroupMembership\\:#"
- "#has typehint with deprecated interface Drupal\\\\group\\\\GroupMembershipLoaderInterface\\:#"
- "#^Constructor of class Drupal\\\\group\\\\GroupMembershipLoader has an unused parameter#"
drupal:
entityMapping:
group:
class: Drupal\group\Entity\Group
storage: Drupal\group\Entity\Storage\GroupStorage
group_config_wrapper:
class: Drupal\group\Entity\ConfigWrapper
storage: Drupal\group\Entity\Storage\ConfigWrapperStorage
group_relationship:
class: Drupal\group\Entity\GroupRelationship
storage: Drupal\group\Entity\Storage\GroupRelationshipStorage
group_relationship_type:
class: Drupal\group\Entity\GroupRelationshipType
storage: Drupal\group\Entity\Storage\GroupRelationshipTypeStorage
group_role:
class: Drupal\group\Entity\GroupRole
storage: Drupal\group\Entity\Storage\GroupRoleStorage
group_type:
class: Drupal\group\Entity\GroupType
......@@ -2,9 +2,9 @@
namespace Drupal\group\Access;
use Drupal\group\Entity\GroupInterface;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Session\AccountInterface;
use Drupal\group\Entity\GroupInterface;
/**
* Extends the AccessResult class with group permission checks.
......
......@@ -2,11 +2,11 @@
namespace Drupal\group\Access;
use Drupal\group\Entity\GroupInterface;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Routing\Access\AccessInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\group\Entity\GroupInterface;
use Symfony\Component\Routing\Route;
/**
......
......@@ -2,11 +2,11 @@
namespace Drupal\group\Access;
use Drupal\group\Entity\GroupInterface;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Routing\Access\AccessInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\group\Entity\GroupInterface;
use Symfony\Component\Routing\Route;
/**
......
......@@ -2,16 +2,18 @@
namespace Drupal\group\Access;
use Drupal\group\Entity\GroupInterface;
use Drupal\group\Entity\GroupRelationshipInterface;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Routing\Access\AccessInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\group\Entity\GroupInterface;
use Drupal\group\Entity\GroupRelationshipInterface;
use Symfony\Component\Routing\Route;
/**
* Determines access to routes based on whether a relationship belongs to the
* Determines access to routes based on group ownership of a relationship.
*
* Access is granted based on whether a relationship on the route belongs to the
* group that was also specified in the route.
*/
class GroupOwnsContentAccessCheck implements AccessInterface {
......
......@@ -2,16 +2,15 @@
namespace Drupal\group\Access;
use Drupal\group\Entity\GroupInterface;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Routing\Access\AccessInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\group\Entity\GroupInterface;
use Symfony\Component\Routing\Route;
/**
* Determines access to routes based on permissions defined via
* $module.group_permissions.yml files.
* Determines access to routes based on group permissions.
*/
class GroupPermissionAccessCheck implements AccessInterface {
......
......@@ -25,7 +25,7 @@ interface GroupPermissionHandlerInterface {
* - title_args: (optional) The placeholder values for the title.
* - description: (optional) An untranslated description of what the
* permission does. You may use placeholders as you would in t().
* - description_args: (optional) The placeholder values for the description.
* - description_args: (optional) The placeholders for the description.
* - restrict access: (optional) A boolean which can be set to TRUE to
* indicate that site administrators should restrict access to this
* permission to trusted users. This should be used for permissions that
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment