#NEWLINE# def test_node_staff_access_page_and_descendants_group_3_nostaff( self ) : #NEWLINE# #INDENT# '\n        simulate behaviour of group 3 member\n        group_b_ACCESS_PAGE_AND_DESCENDANTS to page_b\n        user is not staff\n        ' #NEWLINE# self . _setup_user_groups ( ) #NEWLINE# all_pages = self . _setup_tree_pages ( ) #NEWLINE# self . _setup_view_restrictions ( ) #NEWLINE# granted = [ 'page_b' , 'page_b_a' , 'page_b_b' , 'page_b_b_a' , 'page_b_b_a_a' , 'page_b_b_b' , 'page_b_b_c' , 'page_b_c' , 'page_b_d' , 'page_b_d_a' , 'page_b_d_b' , 'page_b_d_c' ] #NEWLINE# self . assertGrantedVisibility ( all_pages , granted , username = 'user_3_nostaff' ) #NEWLINE# if ( get_user_model ( ) . USERNAME_FIELD == 'email' ) : #NEWLINE# #INDENT# user = get_user_model ( ) . objects . get ( email = 'user_3_nostaff@django-cms.org' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# user = get_user_model ( ) . objects . get ( username = 'user_3_nostaff' ) #NEWLINE# #UNINDENT# urls = self . get_url_dict ( all_pages ) #NEWLINE# url = self . get_pages_root ( ) #NEWLINE# self . assertViewNotAllowed ( urls [ url ] , user ) #NEWLINE# self . assertViewAllowed ( urls [ '/en/page_b/' ] , user ) #NEWLINE# self . assertViewAllowed ( urls [ '/en/page_b/page_b_a/' ] , user ) #NEWLINE# self . assertViewAllowed ( urls [ '/en/page_b/page_b_b/' ] , user ) #NEWLINE# self . assertViewAllowed ( urls [ '/en/page_b/page_b_c/' ] , user ) #NEWLINE# self . assertViewAllowed ( urls [ '/en/page_b/page_b_d/' ] , user ) #NEWLINE# self . assertViewAllowed ( urls [ '/en/page_b/page_b_b/page_b_b_a/' ] , user ) #NEWLINE# self . assertViewAllowed ( urls [ '/en/page_b/page_b_b/page_b_b_a/page_b_b_a_a/' ] , user ) #NEWLINE# self . assertViewNotAllowed ( urls [ '/en/page_c/' ] , user ) #NEWLINE# self . assertViewNotAllowed ( urls [ '/en/page_d/' ] , user ) #NEWLINE# self . assertViewNotAllowed ( urls [ '/en/page_d/page_d_a/' ] , user ) #NEWLINE# self . assertViewNotAllowed ( urls [ '/en/page_d/page_d_b/' ] , user ) #NEWLINE# self . assertViewNotAllowed ( urls [ '/en/page_d/page_d_c/' ] , user )