Dimuthu- how about s/getRoleLitsOfUser/getUserRoles/ ?? Seems more natural.
Sanjiva. On Fri, Jan 21, 2011 at 10:24 PM, Dimuthu Leelarathne <dimut...@wso2.com>wrote: > Hi, > > Since this is a POC we can do this. > > First we can call > -public String[] getRoleListOfUser(String userName) throws > UserStoreException in UserStoreManager > Then we can call the following function for all possible combinations. > -public boolean isRoleAuthorized(String roleName, String resourceId, String > action) > throws UserStoreException; > > Thanks, > Dimuthu > > > On Fri, Jan 21, 2011 at 10:18 PM, Indika Kumara <ind...@wso2.com> wrote: > >> Thanks Dimuthu.. >> >> BTW, what would be the best solution (may be a workaround) - get the roles >> associated with a given user and then the permissions for roles. >> >> Thanks, >> >> Indika >> >> >> On Fri, Jan 21, 2011 at 10:44 PM, Dimuthu Leelarathne >> <dimut...@wso2.com>wrote: >> >>> Hi, >>> >>> On Fri, Jan 21, 2011 at 10:12 PM, Indika Kumara <ind...@wso2.com> wrote: >>> >>>> HI Dimuthu, >>>> >>>> My questions was different ... I needed to get all permissions >>>> associated with a given user for a given resource. >>>> >>>> Something like >>>> >>>> public Permission[] getAllowedPermissions(String username, String >>>> resourceParth) >>>> >>>> The Cassandra's authorization API requires that. >>>> >>>> >>> Sorry misread your mail. >>> >>> Yes can be done. But user permissions are being deprecated. >>> >>> Thanks, >>> Dimuthu >>> >>> >>>> Thanks, >>>> >>>> Indika >>>> >>>> >>>> >>>> On Fri, Jan 21, 2011 at 10:33 PM, Dimuthu Leelarathne < >>>> dimut...@wso2.com> wrote: >>>> >>>>> Hi, >>>>> >>>>> There is a method like this in AuthorizationManager. >>>>> >>>>> public String[] getExplicitlyDeniedUsersForResource(String resourceId, >>>>> String action) >>>>> throws UserStoreException; >>>>> >>>>> public String[] getExplicitlyAllowedUsersForResource(String resourceId, >>>>> String action) >>>>> throws UserStoreException; >>>>> >>>>> However these methods are deprecated since we plan to use role based >>>>> permissions. >>>>> >>>>> thanks, >>>>> dimuthu >>>>> >>>>> On Fri, Jan 21, 2011 at 9:44 PM, Indika Kumara <ind...@wso2.com>wrote: >>>>> >>>>>> Hi All, >>>>>> >>>>>> Could I get the all permission (or actions) allowed for a given user >>>>>> to a given resource - something like getAllowedPermissions(String >>>>>> username, >>>>>> String resourceParth)? I cannot find a method in the >>>>>> 'AuthorizationManager'. >>>>>> >>>>>> >>>>>> Could someone help me on this matter? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Indika >>>>>> >>>>>> _______________________________________________ >>>>>> Carbon-dev mailing list >>>>>> Carbon-dev@wso2.org >>>>>> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> Carbon-dev mailing list >>>>> Carbon-dev@wso2.org >>>>> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Carbon-dev mailing list >>>> Carbon-dev@wso2.org >>>> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>>> >>>> >>> >>> _______________________________________________ >>> Carbon-dev mailing list >>> Carbon-dev@wso2.org >>> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>> >>> >> >> _______________________________________________ >> Carbon-dev mailing list >> Carbon-dev@wso2.org >> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev >> >> > > _______________________________________________ > Carbon-dev mailing list > Carbon-dev@wso2.org > https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev > > -- Sanjiva Weerawarana, Ph.D. Founder, Chairman & CEO; WSO2, Inc.; http://wso2.com/ email: sanj...@wso2.com; phone: +94 11 763 9614; cell: +94 77 787 6880 | +1 650 265 8311 blog: http://sanjiva.weerawarana.org/ Lean . Enterprise . Middleware
_______________________________________________ Carbon-dev mailing list Carbon-dev@wso2.org https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev