Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!
SOLVED

Replication via security based on asset/page metadata property | AEM 6.5

Avatar

Level 4

Hi Everyone,

 

I have use case where content should be replicated based on page/asset metadata. I have a metadata property named status. If status value is 0 then I have to publish this page based on security. Security means, USER WHO CAN ONLY SEE THE CONTENT THAT IS SUPPOSED TO REPLICATED . Now this user should only replicate the pages which metadata property STATUS value is equal to 0(zero),  

 

How can achieve this via security and user?? How can I make the user only replicate the page where status =0?? I want user to see only the content which STATUS =0 and replicate.

Permissions has to be applied at root folder level so that it has to applicable for all the sub pages and folders.

@kautuk_sahni @lukasz-m 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @Uppari_Ramesh 

 

To achieve the desired behavior where a user can only replicate pages with a specific metadata property value (e.g., status = 0), you can follow these steps:

 

  1. Create a dedicated user: Create a user in your AEM instance specifically for the purpose of replicating pages with status = 0. This user should have the necessary permissions to replicate content but limited access to other areas of the system.

  2. Define a custom replication agent: Create a custom replication agent that is configured to use the dedicated user's credentials for replication. This agent will be responsible for replicating pages based on the desired criteria.

  3. Configure permissions: Set up permissions to restrict access to pages based on the status metadata property. Follow these steps:

    • Assign the dedicated user with appropriate read access to the specific content path or paths where the pages reside.
    • Define an Access Control List (ACL) on the content path(s) to allow read access only to users with status = 0. This can be done using a custom ACL and a service user mapping.
  4. Implement custom replication logic: Develop custom code or use an event listener to intercept replication events. In the code, verify the status metadata value of the page being replicated. If the value is 0, proceed with the replication process. Otherwise, skip the replication.

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @Uppari_Ramesh 

You can create a user group and add the allowed users for replication for security .

Secondly you can add a check on quick publish and manage replication via custom JS to check the property from the metadata schema field .

 

Thanks

Himanshu

Himanshu Jain

Avatar

Community Advisor

Hello @Uppari_Ramesh 

 

render conditions to enable Publish/Unpublish based on metadata and ACLs might help achieve the requirement

https://www.bounteous.com/insights/2020/06/10/control-aem-action-menus-render-conditions

 


Aanchal Sikka

Avatar

Employee Advisor

Hi,


Below steps may help:

  1. Create a user group in AEM specifically for users who can replicate the pages with a status of 0. Let's call it "Replication Users Group".

  2. Assign the necessary permissions to the "Replication Users Group" at the appropriate level (e.g., on the specific folders or pages) to enable replication.

  3. Create a custom workflow model in AEM that includes a participant step involving the "Replication Users Group".

  4. In the custom workflow model, add a metadata condition step to check if the status property of the page is equal to 0.

  5. Configure the transition from the metadata condition step to the replication step, ensuring it is taken only when the status is 0.

  6. Assign the custom workflow model to the pages that need to be replicated based on the status property.

By following these steps, only users belonging to the "Replication Users Group" will have the necessary permissions and visibility to replicate pages with a status of 0. Other users will not be able to see or replicate these pages, ensuring content replication is restricted based on the specified metadata condition.

 

Avatar

Correct answer by
Community Advisor

Hello @Uppari_Ramesh 

 

To achieve the desired behavior where a user can only replicate pages with a specific metadata property value (e.g., status = 0), you can follow these steps:

 

  1. Create a dedicated user: Create a user in your AEM instance specifically for the purpose of replicating pages with status = 0. This user should have the necessary permissions to replicate content but limited access to other areas of the system.

  2. Define a custom replication agent: Create a custom replication agent that is configured to use the dedicated user's credentials for replication. This agent will be responsible for replicating pages based on the desired criteria.

  3. Configure permissions: Set up permissions to restrict access to pages based on the status metadata property. Follow these steps:

    • Assign the dedicated user with appropriate read access to the specific content path or paths where the pages reside.
    • Define an Access Control List (ACL) on the content path(s) to allow read access only to users with status = 0. This can be done using a custom ACL and a service user mapping.
  4. Implement custom replication logic: Develop custom code or use an event listener to intercept replication events. In the code, verify the status metadata value of the page being replicated. If the value is 0, proceed with the replication process. Otherwise, skip the replication.