features/identity-roles #14

Merged
jtom38 merged 11 commits from features/identity-roles into main 2023-07-23 16:24:22 -07:00
4 changed files with 6 additions and 6 deletions
Showing only changes of commit c4a84e9adc - Show all commits

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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