-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
When resourceLockObserverUnlock() is called in src/Resources/Pages/Concerns/UsesResourceLock.php by clicking the button to "Unlock page" the record isn't locked by the user that clicked the button.
I noticed that save() has a call to $this->record->refresh(). I tried adding this to resourceLockObserverUnlock() before attempting to lock the record and it appears to work:
public function resourceLockObserverUnlock()
{
if ($this->record->unlock(force: true)) {
$this->closeLockedResourceModal();
// refresh the record before attempting to re-lock
$this->record->refresh();
$this->record->lock();
}
}
Should the record be refreshed prior to attempting to gain a new lock?
Thanks for this great plugin!
Metadata
Metadata
Assignees
Labels
No labels