Location: Symbol Reference > Classes > TJwServerAccessControl Class
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
TJwServerAccessControl Class
Pascal
TJwServerAccessControl = class(TInterfacedObject, IAccessControl, IPersist, IPersistStream);

TJwServerAccessControl provides an implementation of IAccessControl, IPersist and IPersistStream.

This class implements the COM IAccessControl interface to support a security descriptor for server interfaces. It supports Owner, Group (in contrast to the MS implementation of IAccessControl) and DACL. 

This object also supports streaming through IPersistStream. 

 

All COM methods (the methods inherited by the interfaces) are exception proof. I.e. an arbitrary exception is resolved to the error value E_UNEXPECTED. However, the exception EOleSysError can be used to return any other COM error. On the other hand, in debug mode these COM methods raise an exception rather than returning a HRESULT value. It is easier to find an error by an exception than a quiet return value.

All methods which accesses the SecurityDescriptor property are thread safe using a critical section. See property CriticalSection for more information.

 
Name 
Description 
 
This is the overview for the Create constructor overload. 
Name 
Description 
The following tables list the members exposed by TJwServerAccessControl. 
The methods of the TJwServerAccessControl class are listed here. 
The properties of the TJwServerAccessControl class are listed here. 
The events of the TJwServerAccessControl class are listed here. 
 
Name 
Description 
 
OnIsAccessAllowed defines a method that is called after JwIsAccessAllowed made an AccessCheck (result isn't important to this event to be called). 
 
Name 
Description 
 
Resets the AccessControl instance. It removes the DACL and creates a new one with no access at all. It sets owner and group to NULL SID. Sets dirty flag to false 
 
CreateCOMImplementation returns an instance of a IAccessControl interface implemented by MS. 
 
Frees the parameters returned by GetAllAccessRights. Any parameter can be nil. 
 
Returns all access rights, owner and group of the object. 
 
This method GetClassID is used by COM to determine which implementation can stream this object. It implements the IPersist interface. 
 
GetSizeMax returns the maximum size necessary to store the security descriptor. 
 
The method GrantAccessRights grants additional access rights to the DACL of the security descriptor. 
 
The method GrantAccessRights checks whether the given trustee has access or not. 
 
The method IsDirty returns whether the security descriptor has changed since last time it was saved to the stream or not. 
 
JwGetAllAccessRights returns a copy of the DACL, owner and group of the security descriptor. The return values are compatible with MS IAccessControl. 
 
The method JwGrantAccessRights grants additional access rights to the DACL of the security descriptor. 
 
JwIsAccessAllowed determines whether the given trustee has access to the resource considering the security descriptor. 
 
JwRevokeAccessRights removes all given access entries from the DACL. 
 
Replaces the DACL of the security descriptor with the given access list. 
 
Replaces the owner and/or group of the security descriptor. 
 
Load 
Loads a security descriptor from a stream. 
 
Reads a security descriptor from a stream using JWSCL. 
 
RevokeAccessRights removes all given access entries from the DACL. 
 
Save 
Stores a security descriptor to a stream. 
 
Stores the current security descriptor to stream. 
 
Replaces the DACL of the security descriptor with the given access list. 
 
This method is affected by property StrictACLVerify when set to True. 
 
Name 
Description 
 
This property offers a critical section to access the property SecurityDescriptor
 
This flag defines whether the object was changed in respect to the last save method call. Default value is false. This property is used by the interface method IsDirty 
 
Defines the facility code used in the HRESULT value in the faciltiy part. By default the value is $FE.
You can change the value to create your own custom code that is returned in case of errors as HRESULT. 
 
GenericMapping defines a mapping from generic access rights to specific access rights. You can define how to map such generic rights to specific rights. 
 
PersistClassID is returned by GetClassID. It defines a registered COM class that provides the streaming methods for this object. A NULL_GUID defines that there is no class available. In this case the GetClassID returns E_FAIL.
You can register this class (TJwServerAccessControl) as an official COM object. To do so you need to provide the class in a COM dll that is registered properly. 
 
PersistStreamType defines how the security descriptor is stored into the stream. If this value is true a flat memory model of the security descriptor is directly stored into the stream. On the other hand if this value is false the LoadFromStream and SaveToStream of TJwSecurityDescriptor will be used. 
 
This property defines the internal security descriptor used to do access managment. The class must not be freed.
If you intend to write or read from this class you need to do it thread safe since COM can access it from any thread.  
 
This property applies strict compatibility to the implementation of IAccessControl of MS. Default value is false. 
 
SupportIPersistStream defines whether this object can be stored into and loaded from a stream. If this value is false all stream COM methods returns E_NOTIMPL and streaming is not supported. 
Copyright (c) 2010. All rights reserved.
This help was created by Doc-O-Matic sponsored by toolsfactory software inc.
What do you think about this topic? Send feedback!