|
|
The Policy object: How do you get/set permissions?
-
Start with a permissions
file, which we'll talk about later.
-
The Policy
class will then read these permissions. You can intereact with this
singleton class via:
-
getPermissions() - get the permission sets.
-
getPolicy() - gets the Policy singleton (a static method)
-
refresh() - reloads policies. The action this actually takes depends
upon the underlying mechanism that is storing the policies - it could
be an ASCII file, a database, or some type of serialized stream.
-
setPolicy() - sets the Policy singleton to a different Policy object, perhaps
a custom made Policy object. Talk about design pattern!
However, you have to have permission to reset the policy object, you
can't just overwrite the existing object on a whim!
Permissons
|