Is it possible to filter against locked pages?

An automated helper script / impersonate() is blocked from editing files on a locked page.

The isLocked() function doesn’t return true for these pages that have .lock files in them

  • Is it possible to filter against locked pages?

I was able to manually remove lock files and restart the helper but would like to keep the option of sidestepping pages being edited.

Theoretically this should work if the impersonated user and the user for whom the lock is created are different.

Otherwise, it could make sense to check if a lock file is present.

Thanks for the info!

It looks like these are indeed not found, so filtering against locked pages and deleting trailing .lock files at diruri() level anyway should help if file manipulation is disallowed.

Also, on testing against this, I realized the checks were running without an impersonation first, breaking the isLocked()function on server script level, where no user is set by default (except for the locks that wouldn’t be recognized anyway).

[Edit:] also of note: some locks were removed via the isLocked() check, possibly due to missing users.