New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure repository start #368

Closed
tusmester opened this Issue May 24, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@tusmester
Copy link
Member

tusmester commented May 24, 2018

Currently it is possible to inject custom providers and repository start options when you start the repository manually (e.g. in a custom tool or a test method). But this is not accessible for ASP.NET app developers, only if they override the whole application start process, which is overkill.

Solution

Add a new virtual method to the base global class (SenseNetGlobal) that receives a repository builder object as a parameter and call this method before starting the repository.

Using the new api

public class MvcApplication : SenseNet.Portal.SenseNetGlobal
{
    protected override void Application_Start(object sender, EventArgs e, HttpApplication application)
    {
        ...
    }

    protected override void BuildRepository(RepositoryBuilder repositoryBuilder)
    {
        repositoryBuilder
            .UseSecurityMessageProvider(new MyMessageProvider("serviceurl"))
            .UseProvider("myprovider", new MyCustomProvider());
    }
}

Acceptance

  • documentationt: repo start, providers, provider autodiscovery

@tusmester tusmester added this to the Sprint 159 milestone May 24, 2018

@tusmester tusmester self-assigned this May 24, 2018

@tusmester

This comment has been minimized.

Copy link
Member Author

tusmester commented May 29, 2018

A prototype has been created by @kavics, continue this story later.

@tusmester tusmester removed this from the Sprint 159 milestone May 29, 2018

@tusmester

This comment has been minimized.

Copy link
Member Author

tusmester commented Jun 13, 2018

We also need to finalize the automatic initialization of the security message provider when the provider is set on the repobuilder instance (or in the Providers class).

@tusmester tusmester added this to the Sprint 163 milestone Jul 18, 2018

@kultsar kultsar modified the milestones: Sprint 163, Sprint 164 Jul 25, 2018

@kultsar kultsar closed this Aug 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment