moved some rest actions over to roles
This commit is contained in:
parent
64f167c0c5
commit
c4a84e9adc
@ -25,7 +25,7 @@ public class CodeProjectController
|
||||
}
|
||||
|
||||
[HttpPost("check")]
|
||||
[Authorize(Roles = AuthorizationRoles.Administrators)]
|
||||
[Authorize(Roles = Authorization.AdministratorsRole)]
|
||||
public void PullNow()
|
||||
{
|
||||
BackgroundJob.Enqueue<CodeProjectWatcherJob>(x => x.InitAndExecute(new CodeProjectWatcherJobOptions
|
||||
|
@ -28,7 +28,7 @@ public class RssController
|
||||
}
|
||||
|
||||
[HttpPost("check")]
|
||||
[Authorize(Roles = AuthorizationRoles.Administrators)]
|
||||
[Authorize(Roles = Authorization.AdministratorsRole)]
|
||||
public void CheckReddit()
|
||||
{
|
||||
BackgroundJob.Enqueue<RssWatcherJob>(x => x.InitAndExecute(new RssWatcherJobOptions
|
||||
|
@ -200,14 +200,14 @@ public class SourcesController : ControllerBase
|
||||
return SourceDto.Convert(item);
|
||||
}
|
||||
|
||||
[Authorize(Roles = AuthorizationRoles.Administrators)]
|
||||
[Authorize(Roles = Authorization.AdministratorsRole)]
|
||||
[HttpPost("{id}/disable")]
|
||||
public void Disable(Guid id)
|
||||
{
|
||||
_sources.Disable(id);
|
||||
}
|
||||
|
||||
[Authorize(Roles = AuthorizationRoles.Administrators)]
|
||||
[Authorize(Roles = Authorization.AdministratorsRole)]
|
||||
[HttpPost("{id}/enable")]
|
||||
public void Enable(Guid id)
|
||||
{
|
||||
@ -215,7 +215,7 @@ public class SourcesController : ControllerBase
|
||||
}
|
||||
|
||||
[HttpDelete("{id}")]
|
||||
[Authorize(Roles = AuthorizationRoles.Administrators)]
|
||||
[Authorize(Roles = Authorization.AdministratorsRole)]
|
||||
public void Delete(Guid id, bool purgeOrphanedRecords)
|
||||
{
|
||||
_sources.Delete(id);
|
||||
|
@ -28,7 +28,7 @@ public class YoutubeController
|
||||
}
|
||||
|
||||
[HttpPost("check")]
|
||||
[Authorize(Policy = AuthorizationRoles.Administrators)]
|
||||
[Authorize(Policy = Authorization.AdministratorsRole)]
|
||||
public void CheckYoutube()
|
||||
{
|
||||
BackgroundJob.Enqueue<YoutubeWatcherJob>(x => x.InitAndExecute(new YoutubeWatcherJobOptions
|
||||
|
Loading…
Reference in New Issue
Block a user