Install

Works with Drupal: 8.x

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 113.12 KB
MD5: 4f87745f333f82691bb26805cf61da69
SHA-1: 24edf0b1cce9a8cacbd7e56d055bc6918fc29d60
SHA-256: a22b880762c307e5ce9f56a791dbf5b3114d375bf55b01515c662da1698e42cd
Download zip 213.11 KB
MD5: ddef285264b9c145fbb12d1f9b5b4bb7
SHA-1: 3620bf9bac55937d20f1f91b7016b171edd97b3b
SHA-256: 49ccd7d5b04c405ff6a333861dcd373da14cd89ebe5cc1183770b9df62dd92da

Release notes

This alpha release contains significant API and UI changes. The changes are summarized below, along with recommendations for site administrators and developers.

Overview

This release introduces the concept of Domain Administrators separate from Domain Editors. In past versions, user accounts could be assigned to domains, giving them editorial access to content on that domain.

That feature is retained, and supplemented by a new set of data and permissions that allows specific users the right to edit information for specific domain records.

This change introduces a new field on user accounts and creates several new permissions. There are now two domain fields for users:

  1. Domain Access is the editorial permission handler.
  2. Domain administrator is the domain record permission handler.

The permissions for Domain module have also been updated. The list now includes:

  • 'Administer all domain records' -- global permission for administration
  • 'Access inactive domains' -- users may view inactive domains, administrators may enable/disable assigned domains
  • 'Assign additional administrators to assigned domains' -- users may access the Domain Administrator field on users, if they can edit user accounts.
  • 'Create domain records' -- create new domains
  • 'Edit assigned domain records' -- users assigned as a Domain Administrator may edit the domain records assigned to them
  • 'Delete assigned domain records' -- users assigned as a Domain Administrator may delete the domain records assigned to them
  • 'Access the domain switcher block' -- users may view the domain switcher block for debugging. (This block is not intended for user navigation.)
  • 'View assigned domains' -- domain administrators may view their assigned domains in the admin list (admin/config/domain)
  • 'View all registered domains' -- -- domain administrators may view their assigned domains in the admin list (admin/config/domain)
  • 'View debugging information for domain handling' -- users may view the domain debugging block

Note that View permission is required to access edit/delete permissions.

The other major change is a fix by @jurcello to how numeric domain ids are generated. THat fix is important enough that we included a Domain Alpha module to provide an upgrade.

For site administrators

If you have previously installed the module, you will have to do a few things.

  • Fix domain_id numeric values.
    • Enable Domain Alpha
    • Run the database upgrade
    • If using config management, re-export the domain records and check in to version control.
  • Install the Domain Admin field
    • No update is provided for this field.
    • Add manually, using the field ui or loading from the two config files field.storage.user.field_domain_admin.yml and field.field.user.user.field_domain_admin.yml
    • If creating the field manually, if must have the machine name of field_domain_admin
    • Set the form display to use checkboxes.
    • If you receive an error message, see https://www.drupal.org/node/2835885 for discussion. Try using the drush command drush entup to update entity definitions.
  • Check permissions
    • Reassign permissions as desired, if necessary. For admins with Administer domains, no changes should be required.
    • In addition to the changes to Domain permissions noted above, Domain Alias now supports assigning editors to create/edit/delete aliases for assigned domains (see below).
    • Rebuilding the node access permissions (Admin > Reports > Status) is recommended.

For developers

There are a few underlying API changes worth noting. See domain.api.php for details.

  • hook_domain_operations() now should check permissions, and the active $account is passed to the hook.
  • hook_domain_references_alter() now passes a field_type context to distinguish between the admin and editorial fields.
  • Access control handling for submodules (like Domain Alias) inherit from DomainAccessControlHandler to ensure that admin permissions a re respected. This is generally enforced in the DomainListBuilder. (Note: the logic in DomainAliasAccessControlHandler also needs a bit of a rewrite.)
  • Handling of complex form fields (show/hide options behavior) is delegated to the DomainElementManager. If you need to retrieve field values for a domain field, you can use this service.
  • See domain_domain_references_alter() for how the last two items are implemented.

As always, reviews and pull requests are welcome. See https://github.com/agentrickard/domain.

The underlying API should be considered stable. Major data storage changes are not anticipated.

Release roadmap

The release roadmap is captured in GitHub and mirrored in the CHANGELOG. Issues are divided into ALPHA, BETA, and FINAL.

When all BETA issues are complete, we will release beta-1.

When all FINAL issues are complete, we will release rc-1.

Complete log of changes.

  • Updates Travis test runner file to separate test runners.
  • Allow for limited viewing of domains.
  • Adds domain_alias list tests.
  • Functional test for access to editing of domains.
  • Issue #2833053: Domain id is based on hostname, which is not always unique by @jurcello. Better unique id handling.
  • Adds alpha updater module.
  • Adds a test stub for ListBuilder.
  • Moves the custom overview route check to a proper class.
  • Handles routing permissions for the domain list.
  • Updates operations links to handle new alias permissions. hook_domain_operations() added $account variable
  • Handles nested permissions for domain alias routes.
  • Adds permission handlers to Domain Alias.
  • Do not let editors with limited access disable domains.
  • Adds a new permission to view the domain list.
  • Domain Alias needs proper permissions, by Tassilo Groeper.
  • Fixes the collision between domain admin and domain access fields.
  • Fixes failing token test.
  • Basic field visibility and option handling for domain administration.
  • Adds the ElementManager to admin form selection.
  • Fix cache clear to correct failing test.
Created by: agentrickard
Created on: 13 Dec 2016 at 15:23 UTC
Last updated: 27 Mar 2017 at 17:18 UTC
Bug fixes
New features
Unsupported

Other releases