Hi Sumedha This fix doesn't seems harmful. So I am ok with adding this to our code if its necessary. But question I got is since you are writing a plugin extended from our code, Isn't it possible to extend AppFactoryGitBlitUserModel and write your own and add it there? And IIRC you can configure gitblit to use it.
Thanks & Regards Danushka Fernando Software Engineer WSO2 inc. http://wso2.com/ Mobile : +94716332729 On Fri, May 30, 2014 at 3:39 PM, Sumedha Kodithuwakku <[email protected]> wrote: > Hi AF team, > > We need to extend the appfactory-gitblit-plugin [1] to do some changes so > that it can authenticate/authorize users with only their email address. So > basically we want to override authenticate method > of AppFactoryGitBlitAuthenticationProvider and authorize method in > AppFactoryRepositoryAuthorizationClient. > > So doing that it was required to set the authorization client in > the AppFactoryGitBlitUserModel to a custom one. To do that I had to include > the following setter; > > --- > src/main/java/org/wso2/carbon/appfactory/git/AppFactoryGitBlitUserModel.java > (revision > 204299) > +++ > src/main/java/org/wso2/carbon/appfactory/git/AppFactoryGitBlitUserModel.java > (working > copy) > @@ -116,4 +116,7 @@ > return new AppFactoryRepositoryAuthorizationClient(getConfiguration()); > } > > -} > \ No newline at end of file > + public void > setAppFactoryRepositoryAuthorizationClient(AppFactoryRepositoryAuthorizationClient > appFactoryRepositoryAuthorizationClient) { > + this.appFactoryRepositoryAuthorizationClient = > appFactoryRepositoryAuthorizationClient; > + } > +} > > > I have locally made the necessary change and then wrote the new plugin > extending yours and it works as expected (cloning, pushing and UI access > etc). > > If the above is ok, Shall we include the above..? > > [1] > https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/products/appfactory/2.0.0/modules/webapps/gitbilit/appfactory-gitblit-plugin/ > > > Thanks > SumedhaS > > -- > *Sumedha Kodithuwakku* > Software Engineer > WSO2 Inc. : wso2.com > lean . enterprise . middleware > > Email: [email protected]; Mobile: +94 71 808 1124 > Blog: http://sumedhask.blogspot.com/ > > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
