There should be only one place where the code should refer to get the
username, tenant domain etc.. If there is no such method available in app
mgt code, whoever going to fix this, first need to add that method. Then
when we come across places where we need to change the code, we should
point to
Hi Amila,
There are two methods in the manager module,
var getTenantAwareUsername = function (username) {
if(!username){
username = jagg.getUser();
}
var tenantAwareUsername = 'null';
if (username.indexOf(@) != -1) {
tenantAwareUsername = username.substring(0,
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
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
+1 for using a regex which is more readable and maintaiwnance friendly.
Touched, not typed. Erroneous words are a feature, not a typo.
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture