Getting Exception while implementing RowLevelSecurity
Posted: Tue Jun 09, 2015 6:43 am
Hi, All I am Trying to Implement RowLevelSecurity, For Restrict Admin User According to Storage. I have Followed this URL
http://www.broadleafcommerce.com/docs/c ... l-security.
And I had Override these methods addFetchRestrictions() and addFetchRestrictionsRoot() .
So when I logged In in Admin Application i can access all the link except product link when I clicked on Product link then I am Getting ClassCastException like This:
"java.lang.ClassCastException: org.broadleafcommerce.openadmin.server.security.domain.AdminUserImpl cannot be cast to com.iwn.admin.user.MyAdminUser"
When I debug my application I get to know that I am getting Exception in following lines:
Store adminStore = ((MyAdminuser) currentUser).getStore();
Can anyone help me that how to resolve this issue, Thanks.
http://www.broadleafcommerce.com/docs/c ... l-security.
And I had Override these methods addFetchRestrictions() and addFetchRestrictionsRoot() .
So when I logged In in Admin Application i can access all the link except product link when I clicked on Product link then I am Getting ClassCastException like This:
"java.lang.ClassCastException: org.broadleafcommerce.openadmin.server.security.domain.AdminUserImpl cannot be cast to com.iwn.admin.user.MyAdminUser"
When I debug my application I get to know that I am getting Exception in following lines:
Store adminStore = ((MyAdminuser) currentUser).getStore();
Can anyone help me that how to resolve this issue, Thanks.