Hello,

In my case, when specific role user creates new node, it creates new domain for it (created using Rules with the new module I develop domain_rules, and similar to domain_user module).

This new node on the new subdomain should be available to anonymous users, but since it is not part of the "admin/build/domain/roles", it does not happen.

I wouldn't want to need to add each subdomain to the role.

Is there a way nowadays to do this ?

I think we might want to add this feature as an additional option in the "Role settings behavior".
Another solution is to enhance the domain_rules I am working on, and add the ability to set the default roles for new domains as an action.

Comments are welcome.

Regards,
Shushu

Comments

agentrickard’s picture

The 6.x branch is closed to new features. All the main module does is set a 'domain_roles' variable as a serialized array, so you should be able to edit that value in your action.

agentrickard’s picture

Version: 6.x-2.1 » 7.x-2.x-dev
Status: Active » Postponed
agentrickard’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Status: Postponed » Active
David Stosik’s picture

Status: Active » Needs review
StatusFileSize
new4.24 KB

Is this issue equivalent to << Add "All domains" checkboxes line in Domain roles form >> ?

If so, could you please have a look to the attached patch ?

Regards,

David

agentrickard’s picture

Quick look is good. This could (of course) use a test....

David Stosik’s picture

StatusFileSize
new2.48 KB

This patch applies to last 3.x-dev version.

agentrickard’s picture

Status: Needs review » Fixed
StatusFileSize
new4.54 KB
new35.51 KB

Sweet. I cleaned up the form a bit (putting 'All domains' at the top; cleaning up the theme function.) Then I added a very basic test (more are welcome).

Committing.

Marking needs work for Documentation and a Test.

agentrickard’s picture

Component: Code » Documentation
Status: Fixed » Needs work
Issue tags: +handbook

Tagging for documentation.

agentrickard’s picture

Title: Enhance "Add default roles dynamically" to dynamically add new subdomains » Document: "Add default roles dynamically" to dynamically add new subdomains
dqd’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

I'll close this issue due to inactivity for 13 years and upcoming EOL of Drupal 7 in January 2025. While the project's version for Drupal 7 will surely keep providing support for security issues and website breaking bug fixes for Drupal 7, we should try to minimize the open issues for Drupal 7 in the queue as much as possible. A big thanks around for the report and all the efforts in here.