Show navigation | Frontpage | Contact us | Sitemap

ICPDocumentAccess

This interface is not supported by Composite version 1.0

Interface to support access control in document manipulation situations. None of the operations defined in this interface are expected to be part of a transaction. 

All functions defined in here receive information about the current identifier name (Identifier, i.e. “$$WorkflowControl;”), the instance identifier of the site (IID, i.e. “MysiteAdm”) and the login of the user requesting the action (Username, i.e. “Administrator”).

Example

Simple VB class that implements ICPDocumentAccess.

Operations

When a plugin that implements ICPDocumentAccess is attached to a document, the plugin is expected to provide the oprations stated below. The term document is used to describe any document that includes the ICPDocumentAccess plugin.

AllowAdd

  • Long - ParentDocumentId
  • String - Identifier
  • String - IID
  • String - Username

Returns: String

Called when the user request to add a new document below the existing document identified by ParentDocumentId.

If the users request should be denied the returning String should contain the message to be shown to the user. If the request is granted the returned String must be empty.

AllowEdit

  • Long - DocumentId
  • Long - StatusId
  • String - Identifier
  • String - IID
  • String - Username

Returns: String

Called when the user request to edit an existing document (defined by DocumentId, StatusId).

If the users request should be denied the returning String should contain the message to be shown to the user. If the request is granted the returned String must be empty.

AllowCopy

  • Long - ParentDocumentId
  • Long - SourceDocumentId
  • Long - SourceStatusId
  • String - Identifier
  • String - IID
  • String - Username

Returns: String

Called when the user request to copy an existing document (defined by SourceDocumentId, SourceStatusId) to a position below ParentDocumentId.

If the users request should be denied the returning String should contain the message to be shown to the user. If the request is granted the returned String must be empty.

AllowDelete

  • Long - DocumentId
  • String - Identifier
  • String - IID
  • String - Username

Returns: String

Called when the user request to delete all instances of an existing document (defined by DocumentId).

If the users request should be denied the returning String should contain the message to be shown to the user. If the request is granted the returned String must be empty.

AllowDeleteInstance

  • Long - DocumentId
  • Long - StatusId
  • String - Identifier
  • String - IID
  • String - Username

Returns: String

Called when the user request to delete a specific instances of an existing document (defined by DocumentId, StatusId). If StatusId is 1 this is equivalent to deleting the document entirely.

If the users request should be denied the returning String should contain the message to be shown to the user. If the request is granted the returned String must be empty.

AllowApprove

  • Long - DocumentId
  • String - Identifier
  • String - IID
  • String - Username

Returns: String

Called when the user request to approve an existing document (defined by DocumentId), i.e. making the document public.

If the users request should be denied the returning String should contain the message to be shown to the user. If the request is granted the returned String must be empty.

AllowPreview

  • Long - DocumentId
  • Long - StatusId
  • String - Identifier
  • String - IID
  • String - Username

Returns: String

Called when the user request to preview a non-public instances of an existing document (defined by DocumentId, StatusId).

If the users request should be denied the returning String should contain the message to be shown to the user. If the request is granted the returned String must be empty.

AllowMove

  • Long - DocumentId
  • Long - NewParentDocumentId
  • String - Identifier
  • String - IID
  • String - Username

Returns: String

Called when the user request to change the parent of an existing document (defined by DocumentId), i.e. moving the document to a different part of the site.

If the users request should be denied the returning String should contain the message to be shown to the user. If the request is granted the returned String must be empty.

SetGUIInfoOnDocument

  • Long - DocumentId
  • Long - StatusID
  • String - Identifier
  • String - IID
  • String - Username

Returns: Boolean

Called when the user request a document to be shown as an icon. The input contains a document (defined by DocumentId, StatusId). The plugin should return false when the user do not have general access to the document.

The returned values will not impact the actual choices the user has on any specific document, only the graphically layout of the document (i.e. the document will appear with a small padlock if the documents HasAccess value is set to False).

SetGUIInfoOnDocumentList

  • Variant - DocumentList
  • [ Long - DocumentId ]
  • [ Long - StatusId ]
  • [ Boolean - HasAccess ]
  • String - Identifier
  • String - IID
  • String - Username

Returns: Variant

  • [ Long - DocumentId ]
  • [ Long - StatusId ]
  • [ Boolean - HasAccess ]

Called when the user request a list of documents to be shown in the Sitemap. The input array contains a list of documents (defined by DocumentId, StatusId) and boolean values pertaining to each document. The plugin should set HasAccess to false on all documents the user do not have general access to.

The returned values will not impact the actual choices the user has on any specific document, only the graphically layout of the document (i.e. the document will appear with a small padlock if the documents HasAccess value is set to False).

My modules


© 2008 Composite A/S, Danmark
Tlf: +45 39 15 76 00 | info@composite.net
Composite A/S er Microsoft Certified Partner
Composite CMS overholder standarden for valid CSS
Composite CMS overholder standarden for valid XHTML 1.0
Printet fra http://www.composite.net/composite-76.htm
Findes på denne sti: Composite Developer | 3.x technologies | Configuration | Developing COM plug-ins | ICPDocumentAccess