Prohibiting copying from PDM vault

There is a need to prohibit copying from the vault. if the file has not reached a certain state. I tried using Admcmd_Menu and Admcmd_PostCopy/EdmCmd_PreCopy (this is not suitable due to the fact that copying actions are performed in the repository). Maybe someone has encountered? Any information will help.
For example: I go to the repository and use the standard menu functionality to click “Copy”

1 Like

Listen for the PreCopy hook and set EdmCmd.Cancel to false to cancel (it’s short) the copy operation.

Be careful that you cannot cancel individual files in one copy operation. The cancel applies to all files.

This only works when copying inside vault. If the user copies files from the vault to outside it, this does not work(

Try EdmCmd_PreMove for files within the vault.

It feels like you are creating a problem that can be solved by people just not doing something. Instead of punishing the people who are bypassing stuff.

All these commands only work inside the vault

My bad. If you want to prevent files from being added to the vault from outside then you should look at the PreAdd Hook.

No, I need to prevent files from being copied from vault to another location))

Unfortunately, since the PDM explorer is cached to the user’s local file system, preventing data from leaving the vault is not possible.

Some mitigation can be put in place as @AmenJlili mentioned, but it’s possible to access the local cache directly while bypassing PDM altogether.

Hmmm. Please ask yourself why you have to do that. This could be a XY problem.

You might be able to do something with File Explorer folder permissions.

This is what my customer wants, I talk him out of it. But his company’s policy requires solving this problem

Again your best bet is either:

  • Playing on folder and user permissions.
  • Developing an application that integrates with File Explorer and prevents the copy command.