Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Roland Ebner 6 posts 26 karma points
    Jun 22, 2015 @ 10:07
    Roland Ebner
    0

    Custom Members and Groups

    Hello.

    • What i Want to do

    I wan't to extend the Members wich are able to access content on my Umbraco page. This should happen over an Identity Provider (STS, OpenId, Custom, ...) also i want to extend the "Groups" wich this members are in. These Groups cannot be Assigned, they are assigned by the external Provider. So i have an unknown amout of Members (comming from an external Authentication Source) and these members have an known ammout of Groups assigned by the relating Authentication Source (these Groups i would receive for example over an web-service).

    • My Problem so far

    Since the implementations are covered by an Interface (ex.: IMemberGroupService, ...) i thought i could just use it in my own Implementation and hook it up in the ServiceContext, so i build a Wrapper wich implements the IMemberGroupService wich uses the old MemberGroupService and extends the Members by an other source. To do so i created an new BootManager wich inherited from WebBootManager and override the CreateApplicationContext wich creates the ApplicationContext by using the ServiceContext wich gets passed in by an method implemented in the base class. I then created a new ServiceContext and used the public constructor to do so an passed in alle the implementation from the service context and my own implementation of IMemberGroupService. The Problem is i get an InvalidOperationException, Additional information: Current has not been initialized on Umbraco.Core.Persistence.RepositoryResolver. You must initialize Current before trying to read it.

    • So the question is is my aprouch wrong?
    • Is there a better whay to do it?
    • Why can't i access the ServiceContext after it is created?
  • Roland Ebner 6 posts 26 karma points
    Jun 25, 2015 @ 09:07
    Roland Ebner
    0

    no ideas?

Please Sign in or register to post replies

Write your reply to:

Draft