You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by A <ag...@hotmail.com> on 2008/06/25 23:52:57 UTC

AD and user provisioning

Hi, I got user provisioning to work with AD in 4.0. Note that I had to change the class named org.apache.roller.weblogger.ui.core.security.BasicUserAutoProvision because the org.apache.roller.weblogger.ui.core.security.CustomUserRegistry class was setting the new user's id to null.The db schema doesn't allow that, so I just recompiled the BasicUserAutoProvision class with a small fix and placed itback in the jar, andit worked great. I know, talk about a hack beyond description. I attached the source and the class file as well. A
_________________________________________________________________
Are you ready for Windows Live Messenger Beta 8.5 ? Get the latest for free today!
http://entertainment.sympatico.msn.ca/WindowsLiveMessenger

Re: AD and user provisioning

Posted by Alexander Coles <al...@gmail.com>.
On Jun 26, 2008, at 6:59 PM, Matt Raible wrote:

> Apache mailing lists don't accept attachments so the best way to
> submit code is to create a JIRA ticket and attach it there.
>
> Matt

Also, if you just want to add some code for the world to look at - but  
it doesn't warrant creating a ticket, you can try http://pastie.org/  
or http://pastebin.com/.

Alex

Re: AD and user provisioning

Posted by Matt Raible <mr...@gmail.com>.
Apache mailing lists don't accept attachments so the best way to
submit code is to create a JIRA ticket and attach it there.

Matt

On Thu, Jun 26, 2008 at 10:54 AM, A <ag...@hotmail.com> wrote:
>
> Hi,
>
> I though I attached a zip file with it.
> Anyway, here it is:
>
> public class BasicUserAutoProvision implements AutoProvision {    private static Log log = LogFactory.getFactory().getInstance(BasicUserAutoProvision.class);
>
>  public boolean execute() {    User ud = CustomUserRegistry.getUserDetailsFromAuthentication();    if(ud != null) {      UserManager mgr;      ud.setId(org.apache.roller.util.UUIDGenerator.generateUUID());      try {        mgr = WebloggerFactory.getWeblogger().getUserManager();        mgr.addUser(ud);        WebloggerFactory.getWeblogger().flush();      } catch (WebloggerException e) {        log.warn("Error while auto-provisioning user from SSO.", e);      }    }
>    return true;  }
> }
>
>
>> CC: adrianoferraro@hotmail.com> From: alex.coles@gmail.com> To: user@roller.apache.org> Subject: Re: AD and user provisioning> Date: Thu, 26 Jun 2008 12:27:49 +0200> > Hi Adriano,> > Looks like you forgot to attach the source!> > Cheers,> > Alex> > On Jun 25, 2008, at 11:52 PM, A wrote:> > > Hi,> >> > I got user provisioning to work with AD in 4.0.> >> > Note that I had to change the class named> > org.apache.roller.weblogger.ui.core.security.BasicUserAutoProvision > > because the> > org.apache.roller.weblogger.ui.core.security.CustomUserRegistry > > class was setting the new user's id to null.> > The db schema doesn't allow that, so I just recompiled the > > BasicUserAutoProvision class with a small fix and placed it> > back in the jar, andit worked great.> >> > I know, talk about a hack beyond description.> >> > I attached the source and the class file as well.> >> > A> >> > Are you ready for Windows Live Messenger Beta 8.5 ? Get the latest > > for free today! <BasicUserAutoProvision.class>>
> _________________________________________________________________
> R U Ready for Windows Live Messenger Beta 8.5? Try it today!
> http://entertainment.sympatico.msn.ca/WindowsLiveMessenger



-- 
http://raibledesigns.com

RE: AD and user provisioning

Posted by A <ag...@hotmail.com>.
Hi,
 
I though I attached a zip file with it.
Anyway, here it is:
 
public class BasicUserAutoProvision implements AutoProvision {    private static Log log = LogFactory.getFactory().getInstance(BasicUserAutoProvision.class);
 
  public boolean execute() {    User ud = CustomUserRegistry.getUserDetailsFromAuthentication();    if(ud != null) {      UserManager mgr;      ud.setId(org.apache.roller.util.UUIDGenerator.generateUUID());      try {        mgr = WebloggerFactory.getWeblogger().getUserManager();        mgr.addUser(ud);        WebloggerFactory.getWeblogger().flush();      } catch (WebloggerException e) {        log.warn("Error while auto-provisioning user from SSO.", e);      }    }
    return true;  }
}
 
 
> CC: adrianoferraro@hotmail.com> From: alex.coles@gmail.com> To: user@roller.apache.org> Subject: Re: AD and user provisioning> Date: Thu, 26 Jun 2008 12:27:49 +0200> > Hi Adriano,> > Looks like you forgot to attach the source!> > Cheers,> > Alex> > On Jun 25, 2008, at 11:52 PM, A wrote:> > > Hi,> >> > I got user provisioning to work with AD in 4.0.> >> > Note that I had to change the class named> > org.apache.roller.weblogger.ui.core.security.BasicUserAutoProvision > > because the> > org.apache.roller.weblogger.ui.core.security.CustomUserRegistry > > class was setting the new user's id to null.> > The db schema doesn't allow that, so I just recompiled the > > BasicUserAutoProvision class with a small fix and placed it> > back in the jar, andit worked great.> >> > I know, talk about a hack beyond description.> >> > I attached the source and the class file as well.> >> > A> >> > Are you ready for Windows Live Messenger Beta 8.5 ? Get the latest > > for free today! <BasicUserAutoProvision.class>> 
_________________________________________________________________
R U Ready for Windows Live Messenger Beta 8.5? Try it today!
http://entertainment.sympatico.msn.ca/WindowsLiveMessenger

Re: AD and user provisioning

Posted by Alexander Coles <al...@gmail.com>.
Hi Adriano,

Looks like you forgot to attach the source!

Cheers,

Alex

On Jun 25, 2008, at 11:52 PM, A wrote:

> Hi,
>
> I got user provisioning to work with AD in 4.0.
>
> Note that I had to change the class named
> org.apache.roller.weblogger.ui.core.security.BasicUserAutoProvision  
> because the
> org.apache.roller.weblogger.ui.core.security.CustomUserRegistry  
> class was setting the new user's id to null.
> The db schema doesn't allow that, so I just recompiled the  
> BasicUserAutoProvision class with a small fix and placed it
> back in the jar, andit worked great.
>
> I know, talk about a hack beyond description.
>
> I attached the source and the class file as well.
>
> A
>
> Are you ready for Windows Live Messenger Beta 8.5 ? Get the latest  
> for free today! <BasicUserAutoProvision.class>