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")]
|
[HttpPost("check")]
|
||||||
[Authorize(Roles = AuthorizationRoles.Administrators)]
|
[Authorize(Roles = Authorization.AdministratorsRole)]
|
||||||
public void PullNow()
|
public void PullNow()
|
||||||
{
|
{
|
||||||
BackgroundJob.Enqueue<CodeProjectWatcherJob>(x => x.InitAndExecute(new CodeProjectWatcherJobOptions
|
BackgroundJob.Enqueue<CodeProjectWatcherJob>(x => x.InitAndExecute(new CodeProjectWatcherJobOptions
|
||||||
|
@ -28,7 +28,7 @@ public class RssController
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("check")]
|
[HttpPost("check")]
|
||||||
[Authorize(Roles = AuthorizationRoles.Administrators)]
|
[Authorize(Roles = Authorization.AdministratorsRole)]
|
||||||
public void CheckReddit()
|
public void CheckReddit()
|
||||||
{
|
{
|
||||||
BackgroundJob.Enqueue<RssWatcherJob>(x => x.InitAndExecute(new RssWatcherJobOptions
|
BackgroundJob.Enqueue<RssWatcherJob>(x => x.InitAndExecute(new RssWatcherJobOptions
|
||||||
|
@ -200,14 +200,14 @@ public class SourcesController : ControllerBase
|
|||||||
return SourceDto.Convert(item);
|
return SourceDto.Convert(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Authorize(Roles = AuthorizationRoles.Administrators)]
|
[Authorize(Roles = Authorization.AdministratorsRole)]
|
||||||
[HttpPost("{id}/disable")]
|
[HttpPost("{id}/disable")]
|
||||||
public void Disable(Guid id)
|
public void Disable(Guid id)
|
||||||
{
|
{
|
||||||
_sources.Disable(id);
|
_sources.Disable(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Authorize(Roles = AuthorizationRoles.Administrators)]
|
[Authorize(Roles = Authorization.AdministratorsRole)]
|
||||||
[HttpPost("{id}/enable")]
|
[HttpPost("{id}/enable")]
|
||||||
public void Enable(Guid id)
|
public void Enable(Guid id)
|
||||||
{
|
{
|
||||||
@ -215,7 +215,7 @@ public class SourcesController : ControllerBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpDelete("{id}")]
|
[HttpDelete("{id}")]
|
||||||
[Authorize(Roles = AuthorizationRoles.Administrators)]
|
[Authorize(Roles = Authorization.AdministratorsRole)]
|
||||||
public void Delete(Guid id, bool purgeOrphanedRecords)
|
public void Delete(Guid id, bool purgeOrphanedRecords)
|
||||||
{
|
{
|
||||||
_sources.Delete(id);
|
_sources.Delete(id);
|
||||||
|
@ -28,7 +28,7 @@ public class YoutubeController
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("check")]
|
[HttpPost("check")]
|
||||||
[Authorize(Policy = AuthorizationRoles.Administrators)]
|
[Authorize(Policy = Authorization.AdministratorsRole)]
|
||||||
public void CheckYoutube()
|
public void CheckYoutube()
|
||||||
{
|
{
|
||||||
BackgroundJob.Enqueue<YoutubeWatcherJob>(x => x.InitAndExecute(new YoutubeWatcherJobOptions
|
BackgroundJob.Enqueue<YoutubeWatcherJob>(x => x.InitAndExecute(new YoutubeWatcherJobOptions
|
||||||
|
Loading…
Reference in New Issue
Block a user