Ejemplo n.º 1
0
 def render_to_response(self, context):
     if permissions.can_user_edit_page(self.request.user, context['page']):
         return UpdateView.render_to_response(self, context)
     else:
         return HttpResponseForbidden('You do not have permission to edit this page.')
Ejemplo n.º 2
0
def can_edit_page(user, page):
    return permissions.can_user_edit_page(user, page)