Exemplo n.º 1
0
        public ActionResult <WorkSpaceReservationDTO> GetReservationMeta([FromRoute] string id)
        {
            var rid = (HttpContext.User.Identity as ClaimsIdentity).FindFirst("userId").Value;

            if (!_acs.IsAuth(rid))
            {
                Forbid();
            }
            return(new OkObjectResult(Service.GetReservationMeta(id)));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Can Create
 /// </summary>
 /// <param name="id">String id</param>
 /// <param name="model">WorkSpace model</param>
 /// <returns>acs is Auth(id)</returns>
 protected override bool CanCreate(string id, WorkSpace model)
 => _acs.IsAuth(id);
 /// <summary>
 /// Can Read
 /// </summary>
 /// <param name="id">String id</param>
 /// <param name="tid">String tid</param>
 /// <returns>acs Is Auth(id)</returns>
 protected override bool CanRead(string id, string tid)
 => _acs.IsAuth(id);