Am I allowed to do this, or will this break things...
# package-development
s
Am I allowed to do this, or will this break things?
Copy code
public class SectionSecurityComposer : IComposer
    {
        public void Compose(IUmbracoBuilder builder)
        {
            builder.Services.AddAuthorization(o => AddSecurityPolicies(o, Umbraco.Cms.Core.Constants.Security.BackOfficeAuthenticationType));
        }

        private void AddSecurityPolicies(AuthorizationOptions options, string backOfficeAuthenticationScheme)
        {
            options.AddPolicy(Constants.Backoffice.DiscordSectionAccessPolicy, policy =>
            {
                policy.AuthenticationSchemes.Add(backOfficeAuthenticationScheme);
                policy.Requirements.Add(new SectionRequirement(Constants.Backoffice.DiscordSection));
            });
        }
    }