Revert "Merge pull request #188 from Azure/momoe/add-auth-read-tags"
This reverts commita3ee35f52b
, reversing changes made to9b8e776ad6
.
This commit is contained in:
Родитель
66c1ea8fb1
Коммит
7592132447
|
@ -19,14 +19,12 @@ namespace Microsoft.Azure.IoTSolutions.UIConfig.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpGet]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<DeviceGroupListApiModel> GetAllAsync()
|
||||
{
|
||||
return new DeviceGroupListApiModel(await this.storage.GetAllDeviceGroupsAsync());
|
||||
}
|
||||
|
||||
[HttpGet("{id}")]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<DeviceGroupApiModel> GetAsync(string id)
|
||||
{
|
||||
return new DeviceGroupApiModel(await this.storage.GetDeviceGroupAsync(id));
|
||||
|
|
|
@ -24,14 +24,12 @@ namespace Microsoft.Azure.IoTSolutions.UIConfig.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpGet]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<PackageListApiModel> GetAllAsync()
|
||||
{
|
||||
return new PackageListApiModel(await this.storage.GetPackagesAsync());
|
||||
}
|
||||
|
||||
[HttpGet("{id}")]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<PackageApiModel> GetAsync(string id)
|
||||
{
|
||||
if (string.IsNullOrEmpty(id))
|
||||
|
|
|
@ -18,7 +18,6 @@ namespace Microsoft.Azure.IoTSolutions.UIConfig.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpPost]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task PostAsync()
|
||||
{
|
||||
await this.seed.TrySeedAsync();
|
||||
|
|
|
@ -28,21 +28,18 @@ namespace Microsoft.Azure.IoTSolutions.UIConfig.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpGet("solution-settings/theme")]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<object> GetThemeAsync()
|
||||
{
|
||||
return await this.storage.GetThemeAsync();
|
||||
}
|
||||
|
||||
[HttpPut("solution-settings/theme")]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<object> SetThemeAsync([FromBody] object theme)
|
||||
{
|
||||
return await this.storage.SetThemeAsync(theme);
|
||||
}
|
||||
|
||||
[HttpGet("solution-settings/logo")]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task GetLogoAsync()
|
||||
{
|
||||
var model = await this.storage.GetLogoAsync();
|
||||
|
@ -50,7 +47,6 @@ namespace Microsoft.Azure.IoTSolutions.UIConfig.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpPut("solution-settings/logo")]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task SetLogoAsync()
|
||||
{
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
|
|
|
@ -17,7 +17,6 @@ namespace Microsoft.Azure.IoTSolutions.UIConfig.WebService.v1.Controllers
|
|||
this.log = logger;
|
||||
}
|
||||
|
||||
[Authorize("ReadAll")]
|
||||
public StatusApiModel Get()
|
||||
{
|
||||
// TODO: calculate the actual service status
|
||||
|
|
|
@ -18,14 +18,12 @@ namespace Microsoft.Azure.IoTSolutions.UIConfig.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpGet("user-settings/{id}")]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<object> GetUserSettingAsync(string id)
|
||||
{
|
||||
return await this.storage.GetUserSetting(id);
|
||||
}
|
||||
|
||||
[HttpPut("user-settings/{id}")]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<object> SetUserSettingAsync(string id, [FromBody] object setting)
|
||||
{
|
||||
return await this.storage.SetUserSetting(id, setting);
|
||||
|
|
|
@ -34,7 +34,6 @@ namespace Microsoft.Azure.IoTSolutions.DeviceTelemetry.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpGet]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<AlarmByRuleListApiModel> GetAsync(
|
||||
[FromQuery] string from,
|
||||
[FromQuery] string to,
|
||||
|
@ -53,7 +52,6 @@ namespace Microsoft.Azure.IoTSolutions.DeviceTelemetry.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpPost]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<AlarmByRuleListApiModel> PostAsync([FromBody] QueryApiModel body)
|
||||
{
|
||||
string[] deviceIds = body.Devices == null
|
||||
|
@ -70,7 +68,6 @@ namespace Microsoft.Azure.IoTSolutions.DeviceTelemetry.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpGet("{id}")]
|
||||
[Authorize("ReadAll")]
|
||||
public AlarmListByRuleApiModel Get(
|
||||
[FromRoute] string id,
|
||||
[FromQuery] string from,
|
||||
|
@ -90,7 +87,6 @@ namespace Microsoft.Azure.IoTSolutions.DeviceTelemetry.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpPost("{id}")]
|
||||
[Authorize("ReadAll")]
|
||||
public AlarmListByRuleApiModel Post(
|
||||
[FromRoute] string id,
|
||||
[FromBody] QueryApiModel body)
|
||||
|
|
|
@ -34,7 +34,6 @@ namespace Microsoft.Azure.IoTSolutions.DeviceTelemetry.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpGet(Version.PATH + "/[controller]")]
|
||||
[Authorize("ReadAll")]
|
||||
public AlarmListApiModel List(
|
||||
[FromQuery] string from,
|
||||
[FromQuery] string to,
|
||||
|
@ -53,7 +52,6 @@ namespace Microsoft.Azure.IoTSolutions.DeviceTelemetry.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpPost(Version.PATH + "/[controller]")]
|
||||
[Authorize("ReadAll")]
|
||||
public AlarmListApiModel Post([FromBody] QueryApiModel body)
|
||||
{
|
||||
string[] deviceIds = body.Devices == null
|
||||
|
@ -70,7 +68,6 @@ namespace Microsoft.Azure.IoTSolutions.DeviceTelemetry.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpGet(Version.PATH + "/[controller]/{id}")]
|
||||
[Authorize("ReadAll")]
|
||||
public AlarmApiModel Get([FromRoute] string id)
|
||||
{
|
||||
Alarm alarm = this.alarmService.Get(id);
|
||||
|
|
|
@ -30,7 +30,6 @@ namespace Microsoft.Azure.IoTSolutions.DeviceTelemetry.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpGet]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<MessageListApiModel> GetAsync(
|
||||
[FromQuery] string from,
|
||||
[FromQuery] string to,
|
||||
|
@ -49,7 +48,6 @@ namespace Microsoft.Azure.IoTSolutions.DeviceTelemetry.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpPost]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<MessageListApiModel> PostAsync([FromBody] QueryApiModel body)
|
||||
{
|
||||
string[] deviceIds = body.Devices == null
|
||||
|
|
|
@ -21,7 +21,6 @@ namespace Microsoft.Azure.IoTSolutions.DeviceTelemetry.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpGet("{id}")]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<RuleApiModel> GetAsync([FromRoute] string id)
|
||||
{
|
||||
Rule rule = await this.ruleService.GetAsync(id);
|
||||
|
@ -29,7 +28,6 @@ namespace Microsoft.Azure.IoTSolutions.DeviceTelemetry.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpGet]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<RuleListApiModel> ListAsync(
|
||||
[FromQuery] string order,
|
||||
[FromQuery] int? skip,
|
||||
|
|
|
@ -44,7 +44,6 @@ namespace Microsoft.Azure.IoTSolutions.DeviceTelemetry.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpGet]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<StatusApiModel> Get()
|
||||
{
|
||||
var statusIsOk = true;
|
||||
|
|
|
@ -56,7 +56,6 @@ namespace Microsoft.Azure.IoTSolutions.IotHubManager.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpGet]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<DeploymentListApiModel> GetAsync()
|
||||
{
|
||||
return new DeploymentListApiModel(await this.deployments.ListAsync());
|
||||
|
|
|
@ -19,7 +19,6 @@ namespace Microsoft.Azure.IoTSolutions.IotHubManager.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpGet]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<DevicePropertiesApiModel> GetAsync()
|
||||
{
|
||||
return new DevicePropertiesApiModel(await this.deviceProperties.GetListAsync());
|
||||
|
|
|
@ -28,7 +28,6 @@ namespace Microsoft.Azure.IoTSolutions.IotHubManager.WebService.v1.Controllers
|
|||
/// <summary>Get a list of devices</summary>
|
||||
/// <returns>List of devices</returns>
|
||||
[HttpGet]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<DeviceListApiModel> GetDevicesAsync([FromQuery] string query)
|
||||
{
|
||||
string continuationToken = string.Empty;
|
||||
|
@ -41,7 +40,6 @@ namespace Microsoft.Azure.IoTSolutions.IotHubManager.WebService.v1.Controllers
|
|||
}
|
||||
|
||||
[HttpPost("query")]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<DeviceListApiModel> QueryDevicesAsync([FromBody] string query)
|
||||
{
|
||||
string continuationToken = string.Empty;
|
||||
|
@ -57,7 +55,6 @@ namespace Microsoft.Azure.IoTSolutions.IotHubManager.WebService.v1.Controllers
|
|||
/// <param name="id">Device Id</param>
|
||||
/// <returns>Device information</returns>
|
||||
[HttpGet("{id}")]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<DeviceRegistryApiModel> GetDeviceAsync(string id)
|
||||
{
|
||||
return new DeviceRegistryApiModel(await this.devices.GetAsync(id));
|
||||
|
|
|
@ -32,7 +32,6 @@ namespace Microsoft.Azure.IoTSolutions.IotHubManager.WebService.v1.Controllers
|
|||
/// <param name="to">Optional. The end time of interesting period</param>
|
||||
/// <returns>The list of jobs</returns>
|
||||
[HttpGet]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<IEnumerable<JobApiModel>> GetAsync(
|
||||
[FromQuery] JobType? jobType,
|
||||
[FromQuery] JobStatus? jobStatus,
|
||||
|
@ -52,7 +51,6 @@ namespace Microsoft.Azure.IoTSolutions.IotHubManager.WebService.v1.Controllers
|
|||
/// <param name="deviceJobStatus">The interesting device job status. `null` means no restrict</param>
|
||||
/// <returns>The job object</returns>
|
||||
[HttpGet("{jobId}")]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<JobApiModel> GetJobAsync(
|
||||
string jobId,
|
||||
[FromQuery]bool? includeDeviceDetails,
|
||||
|
|
|
@ -25,7 +25,6 @@ namespace Microsoft.Azure.IoTSolutions.IotHubManager.WebService.v1.Controllers
|
|||
/// <param name="query">Where clause of IoTHub query</param>
|
||||
/// <returns>List of module twins</returns>
|
||||
[HttpGet]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<TwinPropertiesListApiModel> GetModuleTwinsAsync([FromQuery] string query)
|
||||
{
|
||||
string continuationToken = string.Empty;
|
||||
|
@ -42,7 +41,6 @@ namespace Microsoft.Azure.IoTSolutions.IotHubManager.WebService.v1.Controllers
|
|||
/// <param name="query">Where clause of IoTHub query</param>
|
||||
/// <returns>List of module twins</returns>
|
||||
[HttpPost("query")]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<TwinPropertiesListApiModel> QueryModuleTwinsAsync([FromBody] string query)
|
||||
{
|
||||
return await this.GetModuleTwinsAsync(query);
|
||||
|
@ -53,7 +51,6 @@ namespace Microsoft.Azure.IoTSolutions.IotHubManager.WebService.v1.Controllers
|
|||
/// <param name="moduleId">Module Id</param>
|
||||
/// <returns>Device information</returns>
|
||||
[HttpGet("{deviceId}/{moduleId}")]
|
||||
[Authorize("ReadAll")]
|
||||
public async Task<TwinPropertiesApiModel> GetModuleTwinAsync(string deviceId, string moduleId)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(deviceId))
|
||||
|
|
|
@ -23,7 +23,6 @@ namespace Microsoft.Azure.IoTSolutions.IotHubManager.WebService.v1.Controllers
|
|||
/// <summary>Return the service status</summary>
|
||||
/// <returns>Status object</returns>
|
||||
[HttpGet]
|
||||
[Authorize("ReadAll")]
|
||||
public StatusApiModel Get()
|
||||
{
|
||||
return new StatusApiModel(true, "Alive and well");
|
||||
|
|
Загрузка…
Ссылка в новой задаче