Hi,

I'm working on [1] and when deleting a claim dialect, although all the
claims inside it get deleted, claim dialect is not deleted from UM_DIALECT
table in the DB.

In the *org.wso2.carbon.user.core.claim.dao.ClaimDAO* class following
method is there which deletes the claim dialect.



* public void deleteDialect(String dialectUri)*
But above method is  not called from anywhere !

In the *org.wso2.carbon.claim.mgt.ClaimManagerHandler* class, following
method is called.

*public void removeClaimDialect(String dialectUri)*

what it does is deleting all the claims that belong to the particular
dialect, but it is not deleting the dialect.

The proper fix is to add a new method to
*org.wso2.carbon.user.api.ClaimManager* interface for deleting a claim
dialect and to implement the method in
*org.wso2.carbon.user.core.claim.DefaultClaimManager* class.

Then from *org.wso2.carbon.claim.mgt.ClaimManagerHandler*, in
*removeClaimDialect(String
dialectUri)* method we can call the new method using the ClaimManager
instance as following

*claimManager.deleteClaimDialect(dialectUri)* and it will fix the issue.

Since this fix needs API change to the *org.wso2.carbon.user.api.ClaimManager
*interface, please instruct whether to proceed with this fix.

[1] https://wso2.org/jira/browse/IDENTITY-3042

Thank you
TharinduE

-- 

Tharindu Edirisinghe
Software Engineer | WSO2 Inc
Identity Server Team
mobile : +94 775 181586
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to