protected override void PostProcessProxyRequest(HttpContext context) { var tableName = StorageRequestAnalyzer.GetRequestedTable(context.Request); if ((context.Response.StatusCode == (int)HttpStatusCode.Created) && StorageRequestAnalyzer.IsCreatingTable(context.Request, tableName)) { // A new table was created -> add permissions to the current user. this.AddTablePermissions(StorageRequestAnalyzer.GetTableToCreate(context.Request), this.RequestValidator.GetUserId(context)); } else if ((context.Response.StatusCode == (int)HttpStatusCode.NoContent) && StorageRequestAnalyzer.IsDeletingTable(context.Request, tableName)) { // A table was deleted -> remove all permissions to that table. this.RemoveAllTablePermissions(tableName); } }
protected override void PostProcessProxyRequest(HttpContext context) { var queueName = StorageRequestAnalyzer.GetRequestedQueue(context.Request); if ((context.Response.StatusCode == (int)HttpStatusCode.Created) && StorageRequestAnalyzer.IsCreatingQueue(context.Request)) { // A new queue was created -> add permissions to the current user. this.AddQueuePermissions(queueName, this.RequestValidator.GetUserId(context)); } else if ((context.Response.StatusCode == (int)HttpStatusCode.NoContent) && StorageRequestAnalyzer.IsDeletingQueue(context.Request)) { // A queue was deleted -> remove all permissions to that queue. this.RemoveAllQueuePermissions(queueName); } }