interface XAccessController in module com::sun::star::security::

(Global Index)

Syntax

interface XAccessController : com::sun::star::uno::XInterface ;

Description

WARNING: this is just a draft and may be changed!

Interface for checking permissions and invoking privileged code.

A privileged call runs at least in the protection domain of the callers code, although you can give an additional AccessControlContext to restrict access.

Method Summary

checkPermission Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect.

doPrivileged Perform the specified action with privileges enabled and restricted by the specified AccessControlContext.

getContext This method takes a "snapshot" of the current calling context and returns it.

Method Details



checkPermission

Syntax

void checkPermission (
com::sun::star::security::Permission perm )
raises ( com::sun::star::security::AccessControlException );

Description

Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect.

This method quietly returns if the access request is permitted, or throws a suitable AccessControlException otherwise.

Parameter perm

access permission to be checked

Throws

AccessControlException thrown if access is denied

doPrivileged

Syntax

any doPrivileged (
com::sun::star::security::XPrivilegedAction action,
com::sun::star::security::XAccessControlContext restriction )
raises ( com::sun::star::uno::Exception );

Description

Perform the specified action with privileges enabled and restricted by the specified AccessControlContext.

The action is performed with the intersection of the the permissions possessed by the caller's protection domain, and those possessed by the domains represented by the specified AccessControlContext. If specified XAccessControlContext is null, then the action is performed only with the permissions possessed by the caller's protection domain.

Parameter action

action object to be execute

Parameter restriction

access control context to restrict permission; null for no restriction

Returns

result

Throws

com::sun::star::uno::Exception any UNO exception may be thrown

getContext

Syntax

com::sun::star::security::XAccessControlContext getContext ();

Description

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.

Returns

snapshot of context
Top of Page