code: def checkUserAccess(self):
          
          # Deny access to foreign analysts
          allowed = True
          pm = getToolByName(self, "portal_membership")
          member = pm.getAuthenticatedMember()
  
          analyst = self.getAnalyst().strip()
          if analyst != _c(member.getId()):
              roles = member.getRoles()
              restrict = 'Manager' not in roles \
                  and 'LabManager' not in roles \
                  and 'LabClerk' not in roles \
                  and 'RegulatoryInspector' not in roles \
                  and self.bika_setup.getRestrictWorksheetUsersAccess()
              allowed = not restrict
  
          return allowed
docs: Checks if the current user has granted access to this worksheet.
              Returns False if the user has no access, otherwise returns True