- Issue created by @rodrigoaguilera
10.1.7
2.0.0-beta1
Receive a warning when trying to delete domain fields from content types.
For content types that don't have domain fields strange access issue appear after running node_access_rebuild() on different domains.
- Create two domains, e.g domain1 and domain2
- Create a role with access to edit article node types (the permission from drupal core)
- Remove both domain fields form the article content type. This I what I figured I should do if I want a content type be available on all domains.
- Login with the admin user on domain1 and create an article node
- Rebuild access permission on admin/reports/status/rebuild on domain1
- Create a user with only that newly created role and login on domain2
- Try to edit the article and receive an access denied
- Login with the admin on domain2 and rebuild access permissions
- Try again to edit the article with the non-admin user successfully.
Restoring the two domain fields on the article content type and then rebuilding access on the default domain solves the issue.
Rebuilding access permissions on a non-default domain still gives access denied errors for users that have permissions to perform the operations, it happens for viewing nodes too so I think there some bug here as one has to be careful to edit nodes and rebuild access from the default domain.
My point here is that I made the mistake of removing the domain access-related fields from content types when that lead to many hard-to-debug errors so I feel we should display a warning when a user attempts to delete the domain fields from a content type.
Active
2.0
Documentation