Hi Amani,

Feel free to go ahead and commit the fix in this place and other places
that you ran into. If you want us to do a end-to-end test with email as
username, we will need a little more time as all of the AF team is
sprinting towards the milestone today.

thanks,
dimuthu



On Wed, Apr 9, 2014 at 8:58 PM, Amani Soysa <am...@wso2.com> wrote:

> Hi Dilshan
>
> What I meant is the following
>
>     tenantDomain = userName.substring(userName.lastIndexOf('@') + 1);
>
> Since we are sure that domain name cannot contain "@" taking lastIndexOf
> is enough and safe rather than writing a regular expression to get the
> tenant domain .. Is there any reason why you suggested regular expression?
>
>
>
>
>
> On Wed, Apr 9, 2014 at 4:13 PM, Dilshan Edirisuriya <dils...@wso2.com>wrote:
>
>> Although the lastIndexOf will work properly I suggest you add an regular
>> expression so that it will work in any instance to get the domain name out
>> of it.
>>
>>
>> On Wed, Apr 9, 2014 at 3:55 PM, Amani Soysa <am...@wso2.com> wrote:
>>
>>>  Hi All,
>>>
>>> We are changing the current tenant model with a flat hierarchy in the
>>> cloud, where we keep the email address as the user name.
>>> In this model, the logged in user will be am...@wso2.com@abc.com, where
>>> my domain name will be abc.com and user name will be am...@wso2.com
>>>
>>> This introduce couple of issues in app management app as in the app
>>> management we assume that there will be only one "@" sign and we are
>>> spiting from "@" sign to get the user name and domain separately.
>>>
>>> For example [1]
>>>
>>>     var getAllAppsOfUser = function(userName){
>>>         // jagg.module("permission").checkUserAuthenticated();
>>>          try {
>>>              var result;
>>>              result = getAllApps(userName.split('@')[0]);
>>>
>>>
>>>
>>>
>>> [1] -
>>> https://svn.wso2.org/repos/wso2/scratch/appfactorycc/products/appfactory/1.1.0/modules/jaggery-apps/appmgt/src/modules/application/get/list.jag
>>>
>>> There are several places like this in app management, how should we
>>> handle it? Is it possible to change the app_mgt code to break the user from
>>> lastIndexOf('@') instead of using split? and also shall we introduce a new
>>> module to get the userName and tenantDomain in a central location so we
>>> don't have to do this same logic in several jaggery pages.
>>>
>>>
>>> Regards,
>>> Amani
>>>
>>> --
>>> Amani Soysa
>>> Senior Software Engineer
>>> Mobile: +94772325528
>>> WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> Architecture@wso2.org
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>>
>> --
>> Dilshan Edirisuriya
>> Senior Software Engineer - WSO2
>> Mob: + 94 777878905
>> http://wso2.com/
>>
>> _______________________________________________
>> Architecture mailing list
>> Architecture@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> Amani Soysa
> Senior Software Engineer
> Mobile: +94772325528
> WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> _______________________________________________
> Architecture mailing list
> Architecture@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Dimuthu Leelarathne
Architect & Product Lead of App Factory

WSO2, Inc. (http://wso2.com)
email: dimut...@wso2.com
Mobile : 0773661935

Lean . Enterprise . Middleware
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to