예제 #1
0
        public Response <PersonAdressViewModel> GetByPersnr([RequiredFromQuery] string application, [RequiredFromQuery] string username, [RequiredFromQuery] long persnr)
        {
            if (user.IsAuthorised(username))
            {
                bool canOnlyReadWorkInformation = user.OnlyReadWorkInformation(username);

                return(backend.GetByPersnr(persnr, canOnlyReadWorkInformation));
            }
            else
            {
                Response <PersonAdressViewModel> r = new Response <PersonAdressViewModel>();
                r.success = "false";
                r.message = "User Is not Authorise!, check permission for user " + username;
                return(r);
            }
        }
예제 #2
0
 public Response <AdressViewModel> GetByPersnr(long persnr)
 {
     return(backend.GetByPersnr(persnr));
 }