On Feb 15, 2008 6:38 PM, Warren <[EMAIL PROTECTED]> wrote:
> Maurice,
>
> Here is my SimpleCachingHive and my Principal. I did not extend Permissin, I
> didn't think I had to. I pretty much based my implementation on you tabs
> example minus the tabs. Should I extend Permission and override hashCode()
> and equals(Object obj). And if I do, how do I force my hive to use my
> extended Permission?
No you don't have to extend permission, it is optional. You could for
example create a ResourcePermission to check for permissions on file
uploads or downloads. For example:
permission org.ResourcePermission "/*.*", "read, write"; //enables
write permission on the root and every subdir
Your hive would not have to have explicit knowledge of this new
permission, it is sufficient if you declare it in your policy file and
in an ISecurityCheck do something like SwarmStrategy.hasPermission(new
ResourcePermission("/somefile.file"));
Anyway moving away from this theoretical exercise and to your problem.
Your principal looks fine, if i have some time I'll try and run it myself.
One small difference i noticed (which should have no impact at all) is
you also use the class to generate the hash and in my simpleprincipal
i don't. But like i said this should not matter at all.
Maurice
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]