src/OrchardCore.Modules/OrchardCore.Contents/Security/ContentTypePermissions.cs
/// <summary>
/// Generates a permission dynamically for a content type, without a display name or category
/// </summary>
Generates a permission dynamically for a content type, without a display name or category
Generates a permission dynamically for a content type without a display name or category
public static Permission CreateDynamicPermission(Permission template, string contentType)
        {
            return new Permission(
                String.Format(template.Name, contentType),
                String.Format(template.Description, contentType),
                (template.ImpliedBy ?? new Permission[0]).Select(t => CreateDynamicPermission(t, contentType))
            );
        }
public static Permission CreateDynamicPermission ( Permission template , string contentType ) { return new Permission ( String . Format ( template . Name , contentType ) , String . Format ( template . Description , contentType ) , ( template . ImpliedBy ?? new Permission [ 0 ] ) . Select ( t => CreateDynamicPermission ( t , contentType ) ) ) ; }
Generates a permission dynamically for a content type, without a display name or category
Generates a permission dynamically for a content type without a display name or category
template
Permission
contentType
string