LibreOffice
LibreOffice 24.2 SDK API Reference
|
Interface for checking permissions and invoking privileged or restricted actions. More...
import"XAccessController.idl";
Public Member Functions | |
void | checkPermission ([in] any perm) raises (AccessControlException) |
Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect. More... | |
any | doRestricted ([in] XAction action, [in] XAccessControlContext restriction) raises (com::sun::star::uno::Exception) |
Perform the specified action restricting permissions to the given XAccessControlContext. More... | |
any | doPrivileged ([in] XAction action, [in] XAccessControlContext restriction) raises (com::sun::star::uno::Exception) |
Perform the specified action adding a set of permissions defined by the given XAccessControlContext. More... | |
XAccessControlContext | getContext () |
This method takes a "snapshot" of the current calling context and returns it. More... | |
Public Member Functions inherited from XInterface | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
Interface for checking permissions and invoking privileged or restricted actions.
void checkPermission | ( | [in] any | perm | ) | |
raises | ( | AccessControlException | |||
) |
Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect.
The semantics are equivalent to the security permission classes of the Java platform.
You can also pass a sequence of permissions (sequence< any >) to check a set of permissions, e.g. for performance reasons. This method quietly returns if the access request is permitted, or throws a suitable AccessControlException otherwise.
perm | permission to be checked |
AccessControlException | thrown if access is denied |
any doPrivileged | ( | [in] XAction | action, |
[in] XAccessControlContext | restriction | ||
) | |||
raises | ( | com::sun::star::uno::Exception | |
) |
Perform the specified action adding a set of permissions defined by the given XAccessControlContext.
The action is performed with the union of the permissions of the currently installed XAccessControlContext, the given XAccessControlContext and the security policy currently in effect. The latter includes static security, e.g. based on user credentials.
If the given XAccessControlContext is null, then the action is performed only with the permissions of the security policy currently in effect.
action | action object to be executed |
restriction | access control context to restrict permission; null for no restriction |
com::sun::star::uno::Exception | any UNO exception may be thrown |
any doRestricted | ( | [in] XAction | action, |
[in] XAccessControlContext | restriction | ||
) | |||
raises | ( | com::sun::star::uno::Exception | |
) |
Perform the specified action restricting permissions to the given XAccessControlContext.
The action is performed with the intersection of the permissions of the currently installed XAccessControlContext, the given XAccessControlContext and the security policy currently in effect. The latter includes static security, e.g. based on user credentials.
If the specified XAccessControlContext is null, then the action is performed with unmodified permissions, i.e. the call makes no sense.
action | action object to be executed |
restriction | access control context to restrict permission; null for no restriction |
com::sun::star::uno::Exception | any UNO exception may be thrown |
XAccessControlContext getContext | ( | ) |
This method takes a "snapshot" of the current calling context and returns it.
This context may then be checked at a later point, possibly in another thread.