code: def setAccessRules(self, pid, public=False):
          
          url = "{url_base}/resource/accessRules/{pid}/".format(url_base=self.url_base,
                                                                pid=pid)
          params = {'public': public}
  
          r = self._request('PUT', url, data=params)
          if r.status_code != 200:
              if r.status_code == 403:
                  raise HydroShareNotAuthorized(('PUT', url))
              elif r.status_code == 404:
                  raise HydroShareNotFound((pid,))
              else:
                  raise HydroShareHTTPException((url, 'PUT', r.status_code, params))
  
          resource = r.json()
          assert(resource['resource_id'] == pid)
          return resource['resource_id']
docs: Set access rules for a resource.  Current only allows for setting the public or private setting.
  
          :param pid: The HydroShare ID of the resource
          :param public: True if the resource should be made public.