protected override bool OnValidateRequest(string userId, HttpContext context) { if (!this.CanUseTables(userId)) { context.Response.EndWithDataServiceError(401, "Unauthorized", "You have no permission to use tables."); } var tableName = StorageRequestAnalyzer.GetRequestedTable(context.Request); if (!this.CanUseTable(userId, tableName, context.Request)) { context.Response.EndWithDataServiceError(401, "Unauthorized", "You have no permission to use this table."); } return(true); }