mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
fixup! Add user_has_lock to PagePermissionTester
This commit is contained in:
parent
c2318b48e6
commit
17f61b5974
@ -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 New Issue
Block a user