Beispiel #1
0
 public GetRolesResponse Post(GetRolesAsAdminRequest request)
 {
     _log.StartLog(request);
     try
     {
         var roles = _credentialStore.GetRoles(request.UserName);
         return(new GetRolesResponse {
             Roles = roles.ToList()
         });
     }
     catch (Exception e)
     {
         _log.Fatal("error", e);
         Errors.Add(e.Message + " " + e.StackTrace);
         return(new GetRolesResponse {
             Errors = Errors
         });
     }
 }
Beispiel #2
0
 public GetRolesResponse Post(GetRolesAsAdminRequest request)
 {
     _log.StartLog(request);
     try
     {
         var roles = _authProvider.GetRoles(request.UserName);
         return new GetRolesResponse {Roles = roles.ToList()};
     }
     catch (Exception e)
     {
         _log.Fatal("error", e );
         Errors.Add(e.Message + " " + e.StackTrace);
         return new GetRolesResponse {Errors = Errors};
     }
 }