mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-03-16 22:10:28 +00:00
fixup! Add user_has_lock to PagePermissionTester
This commit is contained in:
parent
c2318b48e6
commit
17f61b5974
1 changed files with 1 additions and 1 deletions
|
|
@ -1945,7 +1945,7 @@ class PagePermissionTester:
|
|||
return self.user.is_superuser or ('lock' in self.permissions)
|
||||
|
||||
def can_unlock(self):
|
||||
return self.user.is_superuser or self.page.locked_by_id == self.user.pk or ('unlock' in self.permissions)
|
||||
return self.user.is_superuser or self.user_has_lock() or ('unlock' in self.permissions)
|
||||
|
||||
def can_publish_subpage(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue