Hi,
In AddChildPermission when you say fill children do you mean rootPermission.CreateChildPermission or something else? Am sorry having a hard time trying to populate the children. This is what i have so far:
public List<PermissionListDto> GetPermissions()
{
var permissions = PermissionManager.GetAllPermissions();
var rootPermissions = permissions.Where(p => p.Parent == null);
foreach (var rootPermission in rootPermissions)
{
AddChildPermission(rootPermission, permissions);
}
List<PermissionListDto> retValue = rootPermissions.MapTo<List<PermissionListDto>>();
return retValue;
}
private void AddChildPermission(Permission rootPermission, IReadOnlyList<Permission> permissions)
{
foreach(var child in rootPermission.Children)
{
//dont know what to do in here
}
}
Resolved it, I had forgotten to add reference to the AutoMapper class.
Hi,
Thanks for the response. There was an error in the js file that was causing the issue but thats sorted out.
HI,
This is assuming that a DB exists. Can we create the DB for the tenant, if it doesn't exist, when we create the tenant through the interface?