manager view

This commit is contained in:
Aneliya Konarcheva
2021-03-19 12:38:30 +02:00
parent d516d33a38
commit a4c097a8ca
4 changed files with 118 additions and 6 deletions

View File

@@ -27,7 +27,7 @@ namespace Business.Business.Sales
}
else
{
throw new InvalidOperationException("Cannot return all stocks!");
throw new ArgumentException("Cannot return all stocks!");
}
}
@@ -40,7 +40,7 @@ namespace Business.Business.Sales
}
else
{
throw new InvalidOperationException("Cannot get stock!");
throw new ArgumentException("Cannot get stock!");
}
}
@@ -105,7 +105,7 @@ namespace Business.Business.Sales
public void Delete(int id)
{
if (currentUser.RoleId > 1)
if (currentUser.RoleId == 3 )
{
var user = Get(id);
if (user != null)

View File

@@ -8,7 +8,7 @@ using System.Text;
namespace Business.Business.UserManagment.Controllers
{
class RoleController : IReadOnlyController<Role>
public class RoleController : IReadOnlyController<Role>
{
private LuminousContext context;
private User currentUser;