예제 #1
0
 def has_page_change_permission(self):
     if not hasattr(self, 'page_change_permission'):
         if not self.page and not get_cms_setting('PERMISSION'):
             # We can't check permissions for an individual page
             # and can't check global cms permissions because
             # user opted out of them.
             # So just check django auth permissions.
             user = self.request.user
             can_change = has_auth_page_permission(user, action='change')
         else:
             can_change = can_change_page(self.request)
         self.page_change_permission = can_change
     return self.page_change_permission
예제 #2
0
 def has_page_change_permission(self):
     if not hasattr(self, 'page_change_permission'):
         if not self.page and not get_cms_setting('PERMISSION'):
             # We can't check permissions for an individual page
             # and can't check global cms permissions because
             # user opted out of them.
             # So just check django auth permissions.
             user = self.request.user
             can_change = has_auth_page_permission(user, action='change')
         else:
             can_change = can_change_page(self.request)
         self.page_change_permission = can_change
     return self.page_change_permission
예제 #3
0
 def has_page_change_permission(self):
     if not hasattr(self, 'page_change_permission'):
         self.page_change_permission = can_change_page(self.request)
     return self.page_change_permission
예제 #4
0
 def has_page_change_permission(self):
     if not hasattr(self, 'page_change_permission'):
         self.page_change_permission = can_change_page(self.request)
     return self.page_change_permission