code: def hasUserAddEditPermission(self):
          
          mtool = getToolByName(self, 'portal_membership')
          checkPermission = mtool.checkPermission
          # In bika_samplinground_workflow.csv there are defined the ModifyPortalContent statements. There is said that
          # client has ModifyPortalContent permission enabled, so here we have to check if the client satisfy the
          # condition wrote in the function's description
          if (checkPermission(ModifyPortalContent, self) or checkPermission(AddPortalContent, self)) \
                  and 'Client' in api.user.get_current().getRoles():
              # Checking if the current user is a current client's contact
              userID = api.user.get_current().id
              contact_objs = self.getContacts()
              contact_ids = [obj.getUsername() for obj in contact_objs]
              if userID in contact_ids:
                  return True
              else:
                  return False
          return checkPermission(ModifyPortalContent, self) or checkPermission(AddPortalContent, self)
docs: Checks if the current user has privileges to access to the editing view.
          From Jira LIMS-1549:
             - Creation/Edit: Lab manager, Client Contact, Lab Clerk, Client Contact (for Client-specific SRTs)
          :returns: True/False