cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict to empty trashcan

lfedorikova
Champ in-the-making
Champ in-the-making

I would like to restrict emptying of trashcan by ordinary users. Permission to empty trashcan should have only users with admin role.

Is there any way how to solve this issue? For example to implement Java method used as evaluator before button displaying? Or any other sophisticated way, solution or implementation, how to secure this resctriction?

Thanks Smiley Happy

1 ACCEPTED ANSWER

angelborroy
Community Manager Community Manager
Community Manager

You can add your restrictions to Share UI and to Repository service.

In order to hide the Share UI button for non Admin users, you can extend Alfresco.ConsoleTrashcan YUI object:

https://github.com/Alfresco/share/blob/alfresco-share-parent-6.2.0/share/src/main/webapp/components/...

Regarding Repository service, you can create a new NodeServicePolicies.onDeleteNode behaviour listening to sys:archived nodes.

Hyland Developer Evangelist

View answer in original post

2 REPLIES 2

angelborroy
Community Manager Community Manager
Community Manager

You can add your restrictions to Share UI and to Repository service.

In order to hide the Share UI button for non Admin users, you can extend Alfresco.ConsoleTrashcan YUI object:

https://github.com/Alfresco/share/blob/alfresco-share-parent-6.2.0/share/src/main/webapp/components/...

Regarding Repository service, you can create a new NodeServicePolicies.onDeleteNode behaviour listening to sys:archived nodes.

Hyland Developer Evangelist

I also have this kind of requirement, thanks for sharing the link.

Getting started

Explore our Alfresco products with the links below. Use labels to filter content by product module.