It would be great if there was a permission that could allow / restrict users to assign domain paths to only their assigned domains. I have 4 domains, and one of my users is assigned to only one domain to create content. However, they have access to write domain paths for all 4 domains.

Even though their content will only be published to the single domain they are assigned to, if they enter alias' in other domains, and another user later decides to publish this content to the other domains and does not check the domain paths, then these paths will go live.

Comments

agentrickard’s picture

Version: 7.x-1.0-beta2 » 7.x-1.0-beta3

E.g. only expose the form elements for the domains the user controls? Right?

karnal69’s picture

Exactly. If they are only assigned to domain A, they should only be able to set a domain path for domain A and not domain B, C etc as well.

apemantus’s picture

StatusFileSize
new1.19 KB

I wanted this feature as well, so here's a quick patch. One thing I haven't done is check what happens with "delete domain specific aliases" - a user assigned to just domain A should not be able to delete paths for domains B&C.

agentrickard’s picture

Status: Active » Needs review

Please set new patches to 'needs review.'

agentrickard’s picture

Status: Needs review » Needs work

Both actions should probably get a separate permission if we go this route.

1) "Delete path aliases for all domains"
2) "Create path aliases for assigned domains"

Users who cannot delete aliases can leave them empty, which should delete them.

les lim’s picture

StatusFileSize
new2.32 KB

Here's apemantus's patch from #3 re-worked to incorporate the new permissions.

Still "needs work" because domain_path_node_insert() needs to accommodate the possibility of altering only one domain at a time. Right now the function deletes all existing domain paths right from the start, so if you only had access to change the path for one domain, all other domain paths are lost upon save. This is perhaps a different issue, but it's a blocker for this patch.

les lim’s picture

grndlvl’s picture

Assigned: Unassigned » grndlvl
Status: Needs work » Active
Issue tags: +Needs tests
StatusFileSize
new4.85 KB

Re-rolled against recent changes to API and User interface.

I will try to go ahead and work on some tests as well.

grndlvl’s picture

Also we need to update the in line documentation.

grndlvl’s picture

StatusFileSize
new7.49 KB

Completed:
- with 'edit domain paths' permission
- with 'remove all domain paths' permission

Todo:
- without any domain path permissions
- with 'edit assigned domain paths' permission

grndlvl’s picture

Status: Active » Needs review
Issue tags: -Needs tests
StatusFileSize
new13.16 KB

Tests the following permissions
- edit domain paths
- set domain access (does not have ability to set paths unless has domain path permission)
- remove all domain paths
- edit assigned domain paths
- publish to any assigned domains (does not have ability to set paths unless has domain path permission)

grndlvl’s picture

Assigned: grndlvl » Unassigned
agentrickard’s picture

Status: Needs review » Needs work

No longer applies cleanly.

agentrickard’s picture

I take that back. It does apply.

agentrickard’s picture

Status: Needs work » Needs review
agentrickard’s picture

Status: Needs review » Needs work

OK, the tests won't complete for me. They just hang.

mably’s picture

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

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.