Hi APIM team,
I have enabled email username for APIM 2.0.0 and tried self signup feature
which requires admin approval. While doing that, noticed that user creation
approval tasks are not visible in Admin dashboard when logged in as admin
of that particular tenant.
The reason is, there is a validation to check whether the tasks are owned
by the logged in user, and in that method Email username case has not been
handled properly (see below, line #125 to #134).
var actualOwner=response.*::taskAbstract.*::actualOwner;
var store = jagg.module("manager").getAPIStoreObj();
var isEmailLoginEnabled=store.isEnableEmailUsername();
*if(!isEmailLoginEnabled && (username.indexOf("@") != -1)){*
* username=username.split("@")[0];*
*}*
if(username==actualOwner){
return true;
}
Here the actualOwner is a tenant aware and the logged in username is having
the full qualified username. Hence when email is enabled, above split will
not happen and the check will fail.
This can be fixed by using;
var MultitenantUtils = Packages.org.wso2.carbon.utils.multitenancy.
MultitenantUtils;
username = MultitenantUtils.getTenantAwareUsername(username);
I have created a JIRA for this [1]. Can we please get this fixed in next
release.
[1] https://wso2.org/jira/browse/APIMANAGER-5520
Thanks
SumedhaS
--
*Sumedha Kodithuwakku*
Senior Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware
Mobile: +94 71 808 1124 <+94%2071%20808%201124>
Blog: http://sumedhask.blogspot.com/
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev