76 lines
2.1 KiB
C#
76 lines
2.1 KiB
C#
using ApplicationHub.Data.InMemory.Authentication.Entities;
|
|
|
|
namespace ApplicationHub.Data.InMemory.Authentication;
|
|
|
|
internal static class RightData
|
|
{
|
|
public static List<RightDto> Source = new()
|
|
{
|
|
new RightDto
|
|
{
|
|
Id = Guid.Parse("5558D82C-B73B-42AD-9454-EF6FAB2E73EB"),
|
|
Name = "READ",
|
|
},
|
|
new RightDto
|
|
{
|
|
Id = Guid.Parse("5558D82C-B73B-42AD-9454-EF7FAB2E73EB"),
|
|
Name = "WRITE",
|
|
},
|
|
new RightDto
|
|
{
|
|
Id = Guid.Parse("5558D82C-B74B-42AD-9454-EF6FAB5E73EB"),
|
|
Name = "DELETE",
|
|
}
|
|
};
|
|
}
|
|
|
|
internal static class GroupData
|
|
{
|
|
public static List<GroupDto> Source = new()
|
|
{
|
|
new GroupDto
|
|
{
|
|
Id = Guid.Parse("8888D82C-B73B-42AD-9454-EF6FAB2E73EB"),
|
|
Name = "Group_Name_Administrator",
|
|
Rights = RightData.Source
|
|
},
|
|
new GroupDto
|
|
{
|
|
Id = Guid.Parse("8588D82C-B73B-42AD-9454-EF6FAB2E73EB"),
|
|
Name = "Group_Name_User",
|
|
Rights = new List<RightDto>
|
|
{
|
|
RightData.Source.First(x => x.Name == "READ"),
|
|
RightData.Source.First(x => x.Name == "WRITE"),
|
|
}
|
|
},
|
|
new GroupDto
|
|
{
|
|
Id = Guid.Parse("8845D82C-B73B-42AD-9454-EF6FAB2E73EB"),
|
|
Name = "Group_Name_Guest",
|
|
Rights = new List<RightDto>
|
|
{
|
|
RightData.Source.First(x => x.Name == "READ"),
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
internal static class UserData
|
|
{
|
|
public static List<UserDto> Source = new()
|
|
{
|
|
new UserDto
|
|
{
|
|
Id = Guid.Parse("9998D82C-B73B-42AD-9454-EF6FAB2E73EB"),
|
|
UserName = "admin",
|
|
Email = "admin@example.de",
|
|
PasswordHash = "AQAAAAIAAYagAAAAEFTsFQQz1Yp6d2zw5iQ4AzNhQQ7QuvdhK3Y2kN/7wp97OXgB2fTrabYqGDYdFSMMkQ==",
|
|
Active = true,
|
|
Groups = new List<GroupDto>
|
|
{
|
|
GroupData.Source.First(x => x.Name == "Group_Name_Administrator"),
|
|
}
|
|
},
|
|
};
|
|
} |