code: def before_render(self):
          
          # Render the Add button if the user has the AddClient permission
          if check_permission(AddMethod, self.context):
              self.context_actions[_("Add")] = {
                  "url": "createObject?type_name=Method",
                  "icon": "++resource++bika.lims.images/add.png"
              }
          # Don't allow any context actions on the Methods folder
          self.request.set("disable_border", 1)
docs: Before template render hook