Пример #1
0
 public Response <PersonAdressViewModel> GetByKstnr([RequiredFromQuery] string application, [RequiredFromQuery] string username, [RequiredFromQuery] int kstnr, [FromQuery] int page, [FromQuery] int limit)
 {
     //ToDO for now gets all
     if (user.IsAuthorised(username))
     {
         bool canOnlyReadWorkInformation = user.OnlyReadWorkInformation(username);
         return(backend.GetByKstnr(
                    kstnr: kstnr,
                    page: page,
                    limit: limit,
                    workInformationOnly: canOnlyReadWorkInformation
                    ));
     }
     else
     {
         Response <PersonAdressViewModel> r = new Response <PersonAdressViewModel>();
         r.success = "false";
         r.message = "User Is not Authorise!, check permission for user " + username;
         return(r);
     }
 }