Added grant permissions for streaming songs #7
This commit is contained in:
@@ -39,6 +39,7 @@ namespace Icarus.Controllers.V1
|
||||
|
||||
#region HTTP endpoints
|
||||
[HttpGet("{id}")]
|
||||
[Authorize("stream:songs")]
|
||||
public async Task<IActionResult> Get(int id)
|
||||
{
|
||||
var songStore= HttpContext
|
||||
|
||||
@@ -92,6 +92,11 @@ namespace Icarus
|
||||
policy
|
||||
.Requirements
|
||||
.Add(new HasScopeRequirement("read:albums", domain)));
|
||||
|
||||
options.AddPolicy("stream:songs", policy =>
|
||||
policy
|
||||
.Requirements
|
||||
.Add(new HasScopeRequirement("stream:songs", domain)));
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user