Asset Update script not rejecting changes

I have…

  • [x] Checked the logs and have uploaded a log file and provided a link because I found something suspicious there. Please do not post the log file in the topic because very often something important is missing.

I’m submitting a…

  • [x] Regression (a behavior that stopped working in a new release)
  • [ ] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

Attempting to disallow or reject an update to an asset is not working so I can make changes my “Update” script shouldn’t allow.

Expected behavior

When disallow() or reject("reason") are hit in an “Update” script it should not allow the update to go through and show error message to the user.

Minimal reproduction of the problem

  1. Add an “Update” script for assets containing:

    disallow();
    reject(“rejected”);

  1. Attempt to rename an asset (or perform any other update operation).
  2. The rename succeeds.

Environment

  • [x] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [x] Cloud version

Version: 7.2.0 - 7.5.0

Browser:

  • [x] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:
I added same script content to the “Create” and “Move” events and it correctly stopped the operation from going through so I think this could just be to do with updating an asset.

Marked as regression as presumably this has worked in the past but this is the first time I have tried to use the update Asset script.

My app name with this script set up is called: slalfe-test

Update means to upload a new version. Annotate is the dialog.

…I was literally updating the readme… “Update script is executed before an asset is replaced with a new file.”

Feel free to remove all record of this “bug”! :man_facepalming: