Make sure you have the forge Maven2 repository reference and dependency definition in the root pom.xml of your project.
<repositories>
<!-- SNIP -->
<repository>
<id>bloomreach-maven2-forge</id>
<name>Bloomreach Maven 2 Forge repository</name>
<url>https://maven.bloomreach.com/maven2-forge/</url>
<snapshots />
</repository>
<!-- SNIP -->
</repositories>
<!-- SNIP -->
<dependencyManagement>
<!-- SNIP -->
<dependencies>
<!-- SNIP -->
<!-- NOTE: You should set a property named 'forge.folderctxmenus.version' to a version of this plugin! -->
<dependency>
<groupId>org.onehippo.forge.folderctxmenus</groupId>
<artifactId>folderctxmenus-repository</artifactId>
<version>${forge.folderctxmenus.version}</version>
</dependency>
<dependency>
<groupId>org.onehippo.forge.folderctxmenus</groupId>
<artifactId>folderctxmenus-frontend</artifactId>
<version>${forge.folderctxmenus.version}</version>
</dependency>
<!-- SNIP -->
</dependencies>
<!-- SNIP -->
</dependencyManagement>
Add the following dependencies to either cms-dependencies/pom.xml in Bloomreach XM v13
or cms/pom.xml in the earlier versions.
<dependencies>
<!-- SNIP -->
<dependency>
<groupId>org.onehippo.forge.folderctxmenus</groupId>
<artifactId>folderctxmenus-repository</artifactId>
</dependency>
<dependency>
<groupId>org.onehippo.forge.folderctxmenus</groupId>
<artifactId>folderctxmenus-frontend</artifactId>
</dependency>
<!-- SNIP -->
</dependencies>
Now, you're ready to use the plugin!
If you want to use only Programmatic Folder Copy and Move, then you may add the following dependency only.
<repositories>
<!-- SNIP -->
<repository>
<id>bloomreach-maven2-forge</id>
<name>Bloomreach Maven 2 Forge repository</name>
<url>https://maven.bloomreach.com/maven2-forge/</url>
<snapshots />
</repository>
<!-- SNIP -->
</repositories>
<!-- SNIP -->
<dependencyManagement>
<!-- SNIP -->
<dependencies>
<!-- SNIP -->
<!-- NOTE: You should set a property named 'forge.folderctxmenus.version' to a version of this plugin! -->
<dependency>
<groupId>org.onehippo.forge.folderctxmenus</groupId>
<artifactId>folderctxmenus-common</artifactId>
<version>${forge.folderctxmenus.version}</version>
</dependency>
<!-- SNIP -->
</dependencies>
<!-- SNIP -->
</dependencyManagement>
And add the following dependency reference into your Web Application module subproject(s).
<dependencies>
<!-- SNIP -->
<dependency>
<groupId>org.onehippo.forge.folderctxmenus</groupId>
<artifactId>folderctxmenus-common</artifactId>
</dependency>
<!-- SNIP -->
</dependencies>
Now, you're ready to use the common module of the plugin!
The plugin provides granular permission control for folder copy and move operations. As of version 7.1.2+ (FORGE-575), permissions can be split to allow copy-only or move-only access. The older unified permission model is still supported for backward compatibility.
For detailed permission configuration, examples, and troubleshooting, see the Permission Configuration Guide.
Available Privileges:
| Privilege | Role Name | Purpose |
|---|---|---|
folderctxmenus:copy |
folderctxmenus-copy |
Grants permission to copy folders (NEW - FORGE-575) |
folderctxmenus:move |
folderctxmenus-move |
Grants permission to move folders (NEW - FORGE-575) |
folderctxmenus:editor |
folderctxmenus-editor |
Grants both copy and move permissions (Deprecated - for backward compatibility) |
By default, only the admin has privileges to use the extra folder options. This is specified in the security
domain 'extra-folder-options'. By default all users that have the xm.content.admin user role will have
both copy and move permissions on all content.
To allow editors to access the copy and move options on folders, a domain rule needs to be added which provides the appropriate privileges to a specified set of folders.
Example 1: Copy and Move Access (Both Privileges)
To provide both copy and move options on folders, use the folderctxmenus-editor role:
definitions:
config:
/hippo:configuration/hippo:domains/folder-context-menus-demo-content:
jcr:primaryType: hipposys:domain
/content-domain:
jcr:primaryType: hipposys:domainrule
hipposys:equals: true
hipposys:facet: jcr:path
hipposys:type: Reference
hipposys:value: /content
/editor:
jcr:primaryType: hipposys:authrole
hipposys:groups:
.meta:category: system
.meta:add-new-system-values: true
type: string
value: []
hipposys:role: folderctxmenus-editor
hipposys:userrole: xm.content.editor
hipposys:users:
.meta:category: system
.meta:add-new-system-values: true
type: string
value: []
Example 2: Copy-Only Access
To allow users to copy folders but not move them, use the folderctxmenus-copy role:
definitions:
config:
/hippo:configuration/hippo:domains/folder-context-menus-demo-content:
jcr:primaryType: hipposys:domain
/content-domain:
jcr:primaryType: hipposys:domainrule
hipposys:equals: true
hipposys:facet: jcr:path
hipposys:type: Reference
hipposys:value: /content
/author-copy-only:
jcr:primaryType: hipposys:authrole
hipposys:groups:
.meta:category: system
.meta:add-new-system-values: true
type: string
value: []
hipposys:role: folderctxmenus-copy
hipposys:userrole: xm.content.author
hipposys:users:
.meta:category: system
.meta:add-new-system-values: true
type: string
value: []
Example 3: Move-Only Access
To allow users to move folders but not copy them, use the folderctxmenus-move role:
definitions:
config:
/hippo:configuration/hippo:domains/folder-context-menus-demo-content:
jcr:primaryType: hipposys:domain
/content-domain:
jcr:primaryType: hipposys:domainrule
hipposys:equals: true
hipposys:facet: jcr:path
hipposys:type: Reference
hipposys:value: /content
/manager-move-only:
jcr:primaryType: hipposys:authrole
hipposys:groups:
.meta:category: system
.meta:add-new-system-values: true
type: string
value: []
hipposys:role: folderctxmenus-move
hipposys:userrole: xm.content.manager
hipposys:users:
.meta:category: system
.meta:add-new-system-values: true
type: string
value: []
For more information about Bloomreach Authorization model concepts and advanced permission configuration, check out the Bloomreach Authorization Model Concepts and the Permission Configuration Guide.
The older folderctxmenus:editor privilege is still fully supported. Existing configurations using
this privilege will continue to work without any changes and will grant both copy and move permissions.
No migration is required.