code: def before_render(self):
          
          # Render the Add button if the user has the AddClient permission
          if check_permission(AddClient, self.context):
              self.context_actions[_("Add")] = {
                  "url": "createObject?type_name=Client",
                  "icon": "++resource++bika.lims.images/add.png"
              }
  
          # Display a checkbox next to each client in the list if the user has
          # rights for ModifyPortalContent
          self.show_select_column = check_permission(ModifyPortalContent,
                                                     self.context)
docs: Before template render hook