Hi,

Due to $subject ,APIStore anonymous view is broken and no APIs shown..
To fix this,after talk to Asela, I did the change as r179591,but still
APIStore is having the same problem.

When debugging the code,found in the method of updatePermissionTreeFromDB()
in PermissionTree class,its referring the role names with domains as below.

String roleWithDomain = UserCoreUtil.addDomainToName(roleName, domain);
roleWithDomain = roleWithDomain.toLowerCase();
                if (allow == UserCoreConstants.ALLOW) {
                   * tree.authorizeRoleInTree(roleWithDomain,
rs.getString(2), rs.getString(4), false);*
                } else {
                   * tree.denyRoleInTree(roleWithDomain, rs.getString(2),
rs.getString(4), false);*
                }

And the wso2 anonymous role ,has referred as "*system/wso2.anonymous.role*"
from above code block, when setting authorization per anonymous role in
permission tree.

When we implicitly try to authorize existing anonymous role name['*
wso2.anonymous.role*'] from our code block ,it failed..

As the solution if we changed the anonymous.role value defined in
CarbonConstants class [the constant referring from our code blocks] as
below diff,the above will fixed.

-    public static final String REGISTRY_ANONNYMOUS_ROLE_NAME = "*
wso2.anonymous.role*";
+    public static final String REGISTRY_ANONNYMOUS_ROLE_NAME = "*
system/wso2.anonymous.role*";

Shall I proceed with this change?

Thanks;



-- 
Lalaji Sureshika
WSO2, Inc.;  http://wso2.com/
email: [email protected]; cell: +94 71 608 6811
blog: http://lalajisureshika.blogspot.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to