code: def addFolderPermission(self, principal, isAllowed=True, folder=None):
          
          if folder is not None:
              uURL = self._url + "/%s/%s" % (folder, "/permissions/add")
          else:
              uURL = self._url + "/permissions/add"
          params = {
              "f" : "json",
              "principal" : principal,
              "isAllowed" : isAllowed
          }
          return self._post(url=uURL, param_dict=params,
                               securityHandler=self._securityHandler,
                               proxy_url=self._proxy_url,
                               proxy_port=self._proxy_port)
docs: Assigns a new permission to a role (principal). The permission
             on a parent resource is automatically inherited by all child
             resources
             Input:
                principal - name of role to assign/disassign accesss
                isAllowed -  boolean which allows access
             Output:
                JSON message as dictionary