35c5e1af28
Added role based authentication to contollers
23 lines
498 B
C#
23 lines
498 B
C#
using RMDataManagerLibrary.DataAcccess;
|
|
using RMDataManagerLibrary.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Net.Http;
|
|
using System.Web.Http;
|
|
|
|
namespace RMDataManager.Controllers
|
|
{
|
|
[Authorize(Roles = "Cashier")]
|
|
public class ProductController : ApiController
|
|
{
|
|
public List<ProductModel> Get()
|
|
{
|
|
ProductData data = new ProductData();
|
|
|
|
return data.GetProducts();
|
|
}
|
|
}
|
|
}
|