code: def before_render(self):
          
          super(FolderView, self).before_render()
  
          # disable the editable border of the Add-, Display- and Workflow menu
          self.request.set("disable_border", 1)
  
          # the current selected WF state
          self.selected_state = self.get_selected_state()
  
          self.allow_edit = self.is_edit_allowed()
          self.can_manage = self.is_manage_allowed()
  
          # Check if analysts can be assigned
          if self.is_analyst_assignment_allowed():
              self.can_reassign = True
              self.allow_analyst_reassignment()
  
          if not self.can_manage:
              # The current has no prvileges to manage WS.
              # Remove the add button
              self.context_actions = {}
  
          if self.context.bika_setup.getRestrictWorksheetUsersAccess():
              # Display only the worksheets assigned to the current user unless
              # the user belongs to a privileged role
              allowed = ["Manager", "LabManager", "RegulatoryInspector"]
              diff = filter(lambda role: role in allowed, self.member.getRoles())
              self.filter_by_user = len(diff) == 0
  
          if self.filter_by_user:
              # Remove 'Mine' button and hide 'Analyst' column
              del self.review_states[1]  # Mine
              self.columns["Analyst"]["toggle"] = False
              self.contentFilter["getAnalyst"] = self.member.id
              for rvw in self.review_states:
                  rvw["contentFilter"]["getAnalyst"] = self.member.id
docs: Before render hook of the listing base view