public static Convert ( |
||
feature | ||
subject | ||
existsPermission | bool | |
effectiveRight | bool | |
return |
public static FeaturePermissionModel Convert(Feature feature, Subject subject, bool existsPermission, bool effectiveRight)
{
return new FeaturePermissionModel()
{
FeatureId = feature.Id,
FeatureName = feature.Name,
FeatureDescription = feature.Description,
SubjectId = subject.Id,
SubjectName = subject.Name,
SubjectType = subject is User ? "User" : "Role",
ExistsPermission = existsPermission,
EffectiveRight = effectiveRight
};
}