Documents can be Unshared by selecting Share then Unshare in the interface. How can this be accomplished using Javascript so that any document entering the folder is automatically Unshared?

cancel
Showing results for 
Search instead for 
Did you mean: 
ibtmiller
Member II

Documents can be Unshared by selecting Share then Unshare in the interface. How can this be accomplished using Javascript so that any document entering the folder is automatically Unshared?

Can the "Shared->Unshare" function be executed using a Rule that executes a script when a file enters the folder?  Is this a document Property?  Aspect?  Attribute?

7 Replies
dvuika
Alfresco Employee

Re: Documents can be Unshared by selecting Share then Unshare in the interface. How can this be accomplished using Javascript so that any document entering the folder is automatically Unshared?

I suggest asking in the ECM forum. ADF is not related to Share.

eugenio_romano
Alfresco Employee

Re: Documents can be Unshared by selecting Share then Unshare in the interface. How can this be accomplished using Javascript so that any document entering the folder is automatically Unshared?

I am going to move it in ECM

shazada
Partner

Re: Documents can be Unshared by selecting Share then Unshare in the interface. How can this be accomplished using Javascript so that any document entering the folder is automatically Unshared?

Remove the aspect in a rule?

The aspect is

qshare:shared

and just remove it and it should work.

ibtmiller
Member II

Re: Documents can be Unshared by selecting Share then Unshare in the interface. How can this be accomplished using Javascript so that any document entering the folder is automatically Unshared?

Hi,

I would like to use a Rule to remove the “qshare:shared” Aspect but the only Aspects that appear in the interface are:

Audio

Classifiable

Complianceable

Dublin Core

EXIF

Effectivity

Email Alias

Emailable

Geographic

Google Editable

Index Control

Inline Editable

Summarizable

Taggable

Templatable

Versionable

A john.knowles suggested that the Aspect I need to remove is “qshare:shared”.

Thank you,

Tom

cesarista
Customer

Re: Documents can be Unshared by selecting Share then Unshare in the interface. How can this be accomplished using Javascript so that any document entering the folder is automatically Unshared?

In that case, use a rule that runs a JS script (previously saved in /Data Dictionary/Scripts folder) with something like:

document.removeAspect("qshare:shared");

document.save();

Regards.

--C.

shazada
Partner

Re: Documents can be Unshared by selecting Share then Unshare in the interface. How can this be accomplished using Javascript so that any document entering the folder is automatically Unshared?

The list is configurable in a module or in the share-config-custom.xml located in the web-extension folder. But yes a script is easier and doesn't need a restart.

ibtmiller
Member II

Re: Documents can be Unshared by selecting Share then Unshare in the interface.  How can this be accomplished using Javascript so that any document entering the folder is automatically Unshared?

I tried that.  Nothing happened.