hi ian
If I want to determine if the an Authorizable has a Principal
what do you mean by "if an authorizable has a principal"?
in case you are referring to the fact that an authorizable
can have more than a single principal associated with it
there something like Authorizable#getPrincipals in the api.
see also Authorizable#addReferee and #removeReferee.
regards
angela
(presumably witht the PrincipalManager), is there a way of doing this
with the DefaultSecurityManager in JR15 and later, other than iterating
through all the possible principals and searching for a match.
We have uses that have a lot of principals, and getting them and
iterating is inefficient (IMHO), I would like to be able to perform a
search
eg
/**
* @param myPrincipal the principal to be checked
* @param candidatePrincipal the principal that we are checking to see
if myPrincipal has
* @retrun true if myPrincipal has candidatePrincipal, false otherwise
*/
boolean principalManager.hasPrincipal(Principal myPrincipal, Principal
candidatePrincipal)
Ideally I would like that to propagate through to the PrincipalProviders
as this is really an search query that could be expensive.
Is there a way of achinving this *without* changing anyhing inside JR15 ?
Ian