Remplazados algunos checkgrupos faltan 8
This commit is contained in:
@@ -68,7 +68,7 @@ public class VentaController : ControllerBase
|
|||||||
[HttpPost("api/venta/CancelarConsultaVenta")]
|
[HttpPost("api/venta/CancelarConsultaVenta")]
|
||||||
public IActionResult CancelarConsultaVenta([FromHeader(Name = "Auth")] string Auth, NotificacionMarcarLeidoDto dto)
|
public IActionResult CancelarConsultaVenta([FromHeader(Name = "Auth")] string Auth, NotificacionMarcarLeidoDto dto)
|
||||||
{
|
{
|
||||||
var validacion1 = RepositorioGrupos.Singleton.CheckGrupos(Auth, "Propietario");
|
var validacion1 = RepositorioPermisos.Singleton.CheckPermisos(Auth, 15);
|
||||||
if (validacion1 == false)
|
if (validacion1 == false)
|
||||||
{
|
{
|
||||||
return Unauthorized();
|
return Unauthorized();
|
||||||
@@ -97,7 +97,7 @@ public class VentaController : ControllerBase
|
|||||||
Ok(new { message = "Se Envio una notificacion" }) : BadRequest(new { message = "Fallo al Descartar Consulta" });
|
Ok(new { message = "Se Envio una notificacion" }) : BadRequest(new { message = "Fallo al Descartar Consulta" });
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("/api/propiedad/EstaALaVenta")]
|
[HttpGet("/api/propiedad/EstaALaVenta")] //Creo que esto es codigo muerto
|
||||||
public IActionResult EstaALaVenta([FromHeader(Name = "Auth")] string Auth, int idprop = 0)
|
public IActionResult EstaALaVenta([FromHeader(Name = "Auth")] string Auth, int idprop = 0)
|
||||||
{
|
{
|
||||||
var validacion1 = RepositorioGrupos.Singleton.CheckGrupos(Auth, "Propietario");
|
var validacion1 = RepositorioGrupos.Singleton.CheckGrupos(Auth, "Propietario");
|
||||||
@@ -115,8 +115,9 @@ public class VentaController : ControllerBase
|
|||||||
[HttpPut("/api/propiedad/setPropiedadAVenta")]
|
[HttpPut("/api/propiedad/setPropiedadAVenta")]
|
||||||
public IActionResult setPropiedadAVenta([FromHeader(Name = "Auth")] string Auth, SetVentaDto dto)
|
public IActionResult setPropiedadAVenta([FromHeader(Name = "Auth")] string Auth, SetVentaDto dto)
|
||||||
{
|
{
|
||||||
var validacion1 = RepositorioGrupos.Singleton.CheckGrupos(Auth, "Propietario");
|
var validacion1 = RepositorioPermisos.Singleton.CheckPermisos(Auth, 2);
|
||||||
if (validacion1 == false)
|
var validacion2 = RepositorioPermisos.Singleton.CheckPermisos(Auth, 8);
|
||||||
|
if (validacion1 == false || validacion2 == false)
|
||||||
{
|
{
|
||||||
return Unauthorized();
|
return Unauthorized();
|
||||||
}
|
}
|
||||||
@@ -141,7 +142,7 @@ public class VentaController : ControllerBase
|
|||||||
[HttpPut("/api/propiedad/unsetPropiedadAVenta")]
|
[HttpPut("/api/propiedad/unsetPropiedadAVenta")]
|
||||||
public IActionResult unsetPropiedadAVenta([FromHeader(Name = "Auth")] string Auth, SetVentaDto dto)
|
public IActionResult unsetPropiedadAVenta([FromHeader(Name = "Auth")] string Auth, SetVentaDto dto)
|
||||||
{
|
{
|
||||||
var validacion1 = RepositorioGrupos.Singleton.CheckGrupos(Auth, "Propietario");
|
var validacion1 = RepositorioPermisos.Singleton.CheckPermisos(Auth, 15);
|
||||||
if (validacion1 == false)
|
if (validacion1 == false)
|
||||||
{
|
{
|
||||||
return Unauthorized();
|
return Unauthorized();
|
||||||
@@ -169,7 +170,7 @@ public class VentaController : ControllerBase
|
|||||||
[HttpPost("/api/ventas/ejercerOpcionVenta")]
|
[HttpPost("/api/ventas/ejercerOpcionVenta")]
|
||||||
public IActionResult EjercerOpcionVenta([FromHeader(Name = "Auth")] string Auth, [FromQuery] long idcontrato = 0)
|
public IActionResult EjercerOpcionVenta([FromHeader(Name = "Auth")] string Auth, [FromQuery] long idcontrato = 0)
|
||||||
{
|
{
|
||||||
var validacion1 = RepositorioGrupos.Singleton.CheckGrupos(Auth, "Inquilino");
|
var validacion1 = RepositorioPermisos.Singleton.CheckPermisos(Auth, 11);
|
||||||
if (validacion1 == false)
|
if (validacion1 == false)
|
||||||
{
|
{
|
||||||
return Unauthorized();
|
return Unauthorized();
|
||||||
@@ -201,14 +202,10 @@ public class VentaController : ControllerBase
|
|||||||
public async Task<IActionResult> SubirRecibo([FromHeader(Name = "Auth")] string Auth, IFormFile file, long idventa)
|
public async Task<IActionResult> SubirRecibo([FromHeader(Name = "Auth")] string Auth, IFormFile file, long idventa)
|
||||||
{
|
{
|
||||||
if (String.IsNullOrWhiteSpace(Auth)) return Unauthorized();
|
if (String.IsNullOrWhiteSpace(Auth)) return Unauthorized();
|
||||||
var validacion1 = RepositorioGrupos.Singleton.CheckGrupos(Auth, "Propietario");
|
var validacion1 = RepositorioPermisos.Singleton.CheckPermisos(Auth, 13);
|
||||||
if (validacion1 == false)
|
if (validacion1 == false)
|
||||||
{
|
{
|
||||||
validacion1 = RepositorioGrupos.Singleton.CheckGrupos(Auth, "Inquilino");
|
return Unauthorized();
|
||||||
if (validacion1 == false)
|
|
||||||
{
|
|
||||||
return Unauthorized();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idventa <= 0) return BadRequest(new { message = "Las id 0 o menor no son validas" });
|
if (idventa <= 0) return BadRequest(new { message = "Las id 0 o menor no son validas" });
|
||||||
@@ -286,14 +283,10 @@ public class VentaController : ControllerBase
|
|||||||
[HttpGet("/api/ventas/verRecibo")]
|
[HttpGet("/api/ventas/verRecibo")]
|
||||||
public IActionResult verRecibo([FromHeader(Name = "Auth")] string Auth, long idventa = 0)
|
public IActionResult verRecibo([FromHeader(Name = "Auth")] string Auth, long idventa = 0)
|
||||||
{
|
{
|
||||||
var validacion1 = RepositorioGrupos.Singleton.CheckGrupos(Auth, "Propietario");
|
var validacion1 = RepositorioPermisos.Singleton.CheckPermisos(Auth, 13);
|
||||||
if (validacion1 == false)
|
if (validacion1 == false)
|
||||||
{
|
{
|
||||||
validacion1 = RepositorioGrupos.Singleton.CheckGrupos(Auth, "Inquilino");
|
return Unauthorized();
|
||||||
if (validacion1 == false)
|
|
||||||
{
|
|
||||||
return Unauthorized();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (idventa <= 0) return BadRequest(new { message = "No existen ventas validas para la id 0" });
|
if (idventa <= 0) return BadRequest(new { message = "No existen ventas validas para la id 0" });
|
||||||
|
|
||||||
@@ -336,14 +329,10 @@ public class VentaController : ControllerBase
|
|||||||
[HttpPost("/api/ventas/propietarioverifica")]
|
[HttpPost("/api/ventas/propietarioverifica")]
|
||||||
public IActionResult PropietarioVerifica([FromHeader(Name = "Auth")] string Auth, long idventa = 0)
|
public IActionResult PropietarioVerifica([FromHeader(Name = "Auth")] string Auth, long idventa = 0)
|
||||||
{
|
{
|
||||||
var validacion1 = RepositorioGrupos.Singleton.CheckGrupos(Auth, "Propietario");
|
var validacion1 = RepositorioPermisos.Singleton.CheckPermisos(Auth, 13);
|
||||||
if (validacion1 == false)
|
if (validacion1 == false)
|
||||||
{
|
{
|
||||||
validacion1 = RepositorioGrupos.Singleton.CheckGrupos(Auth, "Inquilino");
|
return Unauthorized();
|
||||||
if (validacion1 == false)
|
|
||||||
{
|
|
||||||
return Unauthorized();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (idventa <= 0) return BadRequest(new { message = "No existen ventas validas para la id 0" });
|
if (idventa <= 0) return BadRequest(new { message = "No existen ventas validas para la id 0" });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user