Remove repository trigger

Wednesday, February 22, 2012 0 Comments


We have been told that removing PlasticSCM repositories is very easy. Indeed, it's is.

But, come on!! who wants to remove its own production repositories!!! Ok, ok it can be a mistake.. let's prevent it.... Since the "rm" permission is too much generic (rm label, rm branch, rm changeset, rm item) we are creating a new bunch of permissions for PlasticSCM 4. But until it's released we can use our lovely triggers!!

First create the "rmrep" trigger, you can find the example trigger here. Create it as a "before-rmrep" in order to deny all the "rmrep" operations.

Now try to remove the repository...

You can't!! And you will receive an emergency alert to your mail!


Make sure you create the trigger as a "before-rmrep" trigger and the return value of the program it's not zero.

Enjoy!






0 comentarios: