Multi-tenant role authorization
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Oqtane.Repository;
|
||||
using Oqtane.Models;
|
||||
|
||||
@ -53,6 +54,7 @@ namespace Oqtane.Controllers
|
||||
|
||||
// POST api/<controller>
|
||||
[HttpPost]
|
||||
[Authorize]
|
||||
public Module Post([FromBody] Module Module)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
@ -64,6 +66,7 @@ namespace Oqtane.Controllers
|
||||
|
||||
// PUT api/<controller>/5
|
||||
[HttpPut("{id}")]
|
||||
[Authorize]
|
||||
public Module Put(int id, [FromBody] Module Module)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
@ -75,6 +78,7 @@ namespace Oqtane.Controllers
|
||||
|
||||
// DELETE api/<controller>/5
|
||||
[HttpDelete("{id}")]
|
||||
[Authorize]
|
||||
public void Delete(int id)
|
||||
{
|
||||
Modules.DeleteModule(id);
|
||||
|
Reference in New Issue
Block a user