Commit a28981f8 authored by Marcel Nellesen's avatar Marcel Nellesen

Fix: Alter First and LastNames for the UserManagement (coscine/issues#436)

parent eb457487
......@@ -49,7 +49,7 @@ namespace Coscine.Api.Project.Controllers
{
role = roleModel.GetById(projectRole.RoleId);
}
return new ProjectRoleObject(projectRole.ProjectId, new UserObject(userInst.Id, userInst.DisplayName, userInst.EmailAddress), new RoleObject(role.Id, role.DisplayName));
return new ProjectRoleObject(projectRole.ProjectId, new UserObject(userInst.Id, userInst.DisplayName, userInst.Givenname, userInst.Surname, userInst.EmailAddress), new RoleObject(role.Id, role.DisplayName));
});
}
else
......@@ -67,7 +67,7 @@ namespace Coscine.Api.Project.Controllers
{
RoleModel roleModel = new RoleModel();
Guid.TryParse(projectId, out Guid projectIdGuid);
UserObject userObject = new UserObject(user.Id, user.DisplayName, user.EmailAddress);
UserObject userObject = new UserObject(user.Id, user.DisplayName, user.Givenname, user.Surname, user.EmailAddress);
return _projectRoleModel.GetAllWhere((projectRole) =>
(projectRole.UserId == user.Id &&
......
......@@ -9,12 +9,19 @@ namespace Coscine.Api.Project.ReturnObjects
public Guid Id { get; set; }
public string DisplayName { get; set; }
public string Givenname { get; set; }
public string Surname { get; set; }
public string EmailAddress { get; set; }
public UserObject(Guid id, string displayName, string emailAddress)
public UserObject(Guid id, string displayName, string givenname, string surname, string emailAddress)
{
Id = id;
DisplayName = displayName;
Givenname = givenname;
Surname = surname;
EmailAddress = emailAddress;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment