0

How can I ban unwanted/illegal user operations?

Hi All,

I'd like to implement some business logic in our Shotgun instance. That means I want to check data changes BEFORE the change event ends.

If the change event is illegal in terms of the business logic, it will be rolled back automatically and will raise an appropriate error message.

 

Let's see a simple example for better understanding! Business rule: A project cannot be active till its start date is filled in. However the UI user can set the Status field to 'Active' for a project which Start Date field is empty. I want to ban this status change and show an error message like "Please fill in the Start Date before activating the project"! 

My question is: How can I implement it in Shotgun?

 

I've already searched the Forums here for the solution, but I found only a non-perfect workaround. If I implement an event driven trigger, I can notice the illegal changes just AFTER the event commited. At that point I can execute an inverse operation only instead of banning it and - of course - it is not possible to show an error message.

It can be done for example by database (e.g. postgres) like before event triggers where man can raise an exception, if he wants to ban the transaction.

But I'd be happy with any solution!

Thanks in advance, Jana

1 comment

  • 0
    Avatar
    KP

    Hi Jana,

    Right now we don't have the ability to prevent the action from occurring before the change is made. We do have this on our roadmap however. Being able to allow you to create validation rules for columns that you can define either with a regex pattern or using the familiar query builder within Shotgun to generate a set of rules. As of right now it hasn't been scheduled yet, but our roadmap is pretty fluid to allow for escalating requests and the changing demands of our clients. 

    There's a feature request for this (albeit a simple one) in our Feature Requests forum at https://support.shotgunsoftware.com/entries/27093. I recommend you add your specifics to that entry so we can make sure we cover the specifics of the request and see if anyone else has additional things to add.

Please sign in to leave a comment.