#NEWLINE# def test_nonpublisher_page_permissions( self ) : #NEWLINE# #INDENT# event_editor = get_user_model ( ) . objects . get ( username = 'eventeditor' ) #NEWLINE# homepage = Page . objects . get ( url_path = '/home/' ) #NEWLINE# christmas_page = EventPage . objects . get ( url_path = '/home/events/christmas/' ) #NEWLINE# unpublished_event_page = EventPage . objects . get ( url_path = '/home/events/tentative-unpublished-event/' ) #NEWLINE# someone_elses_event_page = EventPage . objects . get ( url_path = '/home/events/someone-elses-event/' ) #NEWLINE# board_meetings_page = BusinessSubIndex . objects . get ( url_path = '/home/events/businessy-events/board-meetings/' ) #NEWLINE# homepage_perms = homepage . permissions_for_user ( event_editor ) #NEWLINE# christmas_page_perms = christmas_page . permissions_for_user ( event_editor ) #NEWLINE# unpub_perms = unpublished_event_page . permissions_for_user ( event_editor ) #NEWLINE# someone_elses_event_perms = someone_elses_event_page . permissions_for_user ( event_editor ) #NEWLINE# board_meetings_perms = board_meetings_page . permissions_for_user ( event_editor ) #NEWLINE# self . assertFalse ( homepage_perms . can_add_subpage ( ) ) #NEWLINE# self . assertTrue ( christmas_page_perms . can_add_subpage ( ) ) #NEWLINE# self . assertTrue ( unpub_perms . can_add_subpage ( ) ) #NEWLINE# self . assertTrue ( someone_elses_event_perms . can_add_subpage ( ) ) #NEWLINE# self . assertFalse ( homepage_perms . can_edit ( ) ) #NEWLINE# self . assertTrue ( christmas_page_perms . can_edit ( ) ) #NEWLINE# self . assertTrue ( unpub_perms . can_edit ( ) ) #NEWLINE# self . assertFalse ( someone_elses_event_perms . can_edit ( ) ) #NEWLINE# self . assertFalse ( homepage_perms . can_delete ( ) ) #NEWLINE# self . assertFalse ( christmas_page_perms . can_delete ( ) ) #NEWLINE# self . assertTrue ( unpub_perms . can_delete ( ) ) #NEWLINE# self . assertFalse ( someone_elses_event_perms . can_delete ( ) ) #NEWLINE# self . assertFalse ( homepage_perms . can_publish ( ) ) #NEWLINE# self . assertFalse ( christmas_page_perms . can_publish ( ) ) #NEWLINE# self . assertFalse ( unpub_perms . can_publish ( ) ) #NEWLINE# self . assertFalse ( homepage_perms . can_unpublish ( ) ) #NEWLINE# self . assertFalse ( christmas_page_perms . can_unpublish ( ) ) #NEWLINE# self . assertFalse ( unpub_perms . can_unpublish ( ) ) #NEWLINE# self . assertFalse ( homepage_perms . can_publish_subpage ( ) ) #NEWLINE# self . assertFalse ( christmas_page_perms . can_publish_subpage ( ) ) #NEWLINE# self . assertFalse ( unpub_perms . can_publish_subpage ( ) ) #NEWLINE# self . assertFalse ( homepage_perms . can_reorder_children ( ) ) #NEWLINE# self . assertFalse ( christmas_page_perms . can_reorder_children ( ) ) #NEWLINE# self . assertFalse ( unpub_perms . can_reorder_children ( ) ) #NEWLINE# self . assertFalse ( homepage_perms . can_move ( ) ) #NEWLINE# self . assertFalse ( christmas_page_perms . can_move ( ) ) #NEWLINE# self . assertTrue ( unpub_perms . can_move ( ) ) #NEWLINE# self . assertFalse ( someone_elses_event_perms . can_move ( ) ) #NEWLINE# self . assertFalse ( christmas_page_perms . can_move_to ( unpublished_event_page ) ) #NEWLINE# self . assertTrue ( unpub_perms . can_move_to ( christmas_page ) ) #NEWLINE# self . assertFalse ( unpub_perms . can_move_to ( homepage ) ) #NEWLINE# self . assertFalse ( unpub_perms . can_move_to ( unpublished_event_page ) ) #NEWLINE# self . assertFalse ( unpub_perms . can_move_to ( board_meetings_page ) ) #NEWLINE# self . assertTrue ( board_meetings_perms . can_move ( ) ) #NEWLINE# self . assertFalse ( board_meetings_perms . can_move_to ( christmas_page ) )