authorizations and routes

vnext
Paul Schneider 8 years ago
parent 452838cf90
commit 4fa34f40a4
2 changed files with 4 additions and 2 deletions

@ -1,5 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Mvc;
using Microsoft.Data.Entity; using Microsoft.Data.Entity;
@ -9,7 +10,7 @@ using Yavsc.Models.Booking;
namespace Yavsc.Controllers namespace Yavsc.Controllers
{ {
[Produces("application/json")] [Produces("application/json")]
[Route("api/BookQueryApi")] [Route("api/bookquery"),Authorize(Roles="Performer,Administrator")]
public class BookQueryApiController : Controller public class BookQueryApiController : Controller
{ {
private ApplicationDbContext _context; private ApplicationDbContext _context;

@ -1,5 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Mvc;
using Microsoft.Data.Entity; using Microsoft.Data.Entity;
@ -9,7 +10,7 @@ using Yavsc.Models.Billing;
namespace Yavsc.Controllers namespace Yavsc.Controllers
{ {
[Produces("application/json")] [Produces("application/json")]
[Route("api/Estimate")] [Route("api/do"),Authorize(Roles="Performer,Administrator")]
public class EstimateApiController : Controller public class EstimateApiController : Controller
{ {
private ApplicationDbContext _context; private ApplicationDbContext _context;

Loading…