コード例 #1
0
 public void AllowTaskReservationUpdates()
 {
     var url = GetWorkspaceUrl() + "/Tasks/**";
     var policy = new Policy(url, "POST", true);
     policy.postFilter.Add("ReservationStatus", Policy.required);
     policies.Add(policy);
 }
コード例 #2
0
 public void AllowWorkerActivityUpdates()
 {
     var url = GetWorkerUrl();
     var policy = new Policy(url, "POST", true);
     policy.postFilter.Add("ActivitySid", Policy.required);
     policies.Add(policy);
 }
コード例 #3
0
        public void AddPolicy(string url, string method, bool allowed,
            Dictionary<string, Dictionary<string, bool>> queryFilter = null,
            Dictionary<string, Dictionary<string, bool>> postFilter = null) {
            if (queryFilter == null) {
                queryFilter = new Dictionary<string, Dictionary<string, bool>>();
            }
            if (postFilter == null) {
                postFilter = new Dictionary<string, Dictionary<string, bool>> ();
            }

            var policy = new Policy (url, method, queryFilter, postFilter, allowed);
            policies.Add(policy);
        }
コード例 #4
0
 public void AllowActivityUpdates()
 {
     var policy = new Policy(this.resourceUrl, "POST", true);
     policy.postFilter.Add("ActivitySid", Policy.required);
     policies.Add(policy);
 }
コード例 #5
0
 public void AllowTaskReservationUpdates()
 {
     if (channelId.Substring (0, 2).Equals ("WK")) {
         var policy = new Policy(this.baseUrl + "/Tasks/**", "POST", true);
         policy.postFilter.Add("ReservationStatus", Policy.required);
         policies.Add(policy);
     } else {
         throw new Exception ("Deprecated function not applicable to non Worker");
     }
 }
コード例 #6
0
 public void AllowWorkerActivityUpdates()
 {
     if (channelId.Substring (0, 2).Equals ("WK")) {
         var policy = new Policy (this.resourceUrl, "POST", true);
         policy.postFilter.Add ("ActivitySid", Policy.required);
         policies.Add (policy);
     } else {
         throw new Exception ("Deprecated function not applicable to non Worker");
     }
 }