Hi Udara, On Mon, Jul 20, 2015 at 11:01 PM, Udara Rathnayake <uda...@wso2.com> wrote:
> Hi All, > > Self sign-up handles within SSO app on our side not through the store or > publisher. Above approach will work if we are to use the OOTB provided > setup(store/publishred SSOed with sso app). But will break once configured > with an external IDP. > I think keeping self signup component in SSO app is not correct.It has to be part of Store/Publisher/common..For example,consider how current APIM Store and Publisher works in both SSO enabled/disabled scenarios with having self signup feature.IMO,same behaviour has to be support from ES store and publisher as well. Our requirement is to set an asset specific permission ['API'->'Subscribe'],when a user signup to store either SSO enabled/disabled.So from ES side there has to be a signup component which works in both SSO enabled/disabled mode and which is able to set asset specific permissions in to the signup user. Thanks; > Regards, > UdaraR > > On Tue, Jul 21, 2015 at 6:49 AM, Lalaji Sureshika <lal...@wso2.com> wrote: > >> Hi Sameera, >> >> On Jul 20, 2015 9:32 PM, "Sameera Medagammaddegedara" <samee...@wso2.com> >> wrote: >> > >> > Hi Lakshman, >> > >> > >> > Could we not do this in the onUserLoggedIn callback itself after >> checking if the logged in user already has the subscriber role or not? >> >> We can't use this approach,because then for any user tries to login to >> store,we are setting the subscriber role,which is incorrect.. >> > Shouldn't all store sign-up users have the subscriber role? Can there be > store logged-in users without having the subscriber role? > >> > >> > >> > Thank You, >> > Sameera >> > >> > On Mon, Jul 20, 2015 at 6:10 AM, Lakshman Udayakantha < >> lakshm...@wso2.com> wrote: >> >> >> >> Couldn't add onLogin function is used in extension in previous mail. >> sorry for that. find it below. >> >> >> >> onUserLoggedIn : function(){ >> >> var userName=ctx.username; >> >> var apistore = >> require('apistore').apistore.instance(userName); >> >> var subscriber=apistore.getSubscriber(userName); >> >> if(!subscriber){ >> >> apistore.addSubscriber(userName,ctx.tenantId); >> >> } >> >> }, >> >> >> >> additionally, found below function >> >> >> >> event.on('userRegister', function (tenantId, user) { >> >> log.info("user >> registering..................................."); >> >> configs(tenantId).userRoles.forEach(function (role) { >> >> if (user.hasRoles([role])) { >> >> return; >> >> } >> >> user.addRoles([role]); >> >> }); >> >> }); >> >> >> >> It should be call on user signup. But it calls on first login for the >> users who signed up. Any way I can't change that function to add subscriber >> role to users because this function found in store/module/store.js file >> which is not in extension directory. simply this function reside in ES code >> and adding subscriber role to users should happen in extension because that >> functionality is specific to API store. >> >> >> >> Thanks >> >> >> >> On Mon, Jul 20, 2015 at 3:05 PM, Lakshman Udayakantha < >> lakshm...@wso2.com> wrote: >> >>> >> >>> Hi Sameera/ES Team, >> >>> >> >>> I am working on [1]. I want to add to users who sign up in store, the >> subscriber role. >> >>> Below function is used to add users as subscribers in their first >> login to subscriber tables in asset.js function in store extension. similar >> requirement needs for signup as well. how do I achieve this? >> >>> >> >>> [1] https://wso2.org/jira/browse/REGISTRY-2683 >> >>> >> >>> Thanks >> >>> -- >> >>> Lakshman Udayakantha >> >>> WSO2 Inc. www.wso2.com >> >>> lean.enterprise.middleware >> >>> Mobile: 0711241005 >> >>> >> >> >> >> >> >> >> >> -- >> >> Lakshman Udayakantha >> >> WSO2 Inc. www.wso2.com >> >> lean.enterprise.middleware >> >> Mobile: 0711241005 >> >> >> > >> > >> > >> > -- >> > Sameera Medagammaddegedara >> > Software Engineer >> > >> > Contact: >> > Email: samee...@wso2.com >> > Mobile: + 94 077 255 3005 >> >> > -- Lalaji Sureshika WSO2, Inc.; http://wso2.com/ email: lal...@wso2.com; cell: +94 71 608 6811 blog: http://lalajisureshika.blogspot.com
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev