add security to site template API
This commit is contained in:
		| @ -1,7 +1,9 @@ | ||||
| using System.Collections.Generic; | ||||
| using Microsoft.AspNetCore.Authorization; | ||||
| using Microsoft.AspNetCore.Mvc; | ||||
| using Oqtane.Models; | ||||
| using Oqtane.Repository; | ||||
| using Oqtane.Shared; | ||||
|  | ||||
| namespace Oqtane.Controllers | ||||
| { | ||||
| @ -17,6 +19,7 @@ namespace Oqtane.Controllers | ||||
|  | ||||
|         // GET: api/<controller> | ||||
|         [HttpGet] | ||||
|         [Authorize(Roles = Constants.HostRole)] | ||||
|         public IEnumerable<SiteTemplate> Get() | ||||
|         { | ||||
|             return _siteTemplates.GetSiteTemplates(); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shaun Walker
					Shaun Walker