Top   Module   Use   Manual   Index 
 EXPORTING SERVICES | METHODS' SUMMARY | METHODS' DETAILS 

com :: sun :: star :: security ::

interface XAccessController

Base Interface
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.



Known Services which Export this Interface

com::sun::star::security::AccessController
com::sun::star::security::AccessController

Methods' 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.

Methods' Details

checkPermission
 
void
checkPermission(
[ in ] 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
 
any
doPrivileged(
[ in ] com::sun::star::security::XPrivilegedAction action,
[ in ] 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
 
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