# Demo using UI

## 1. Document reviews <a href="#id-1.-document-reviews" id="id-1.-document-reviews"></a>

### 1.1 Overview <a href="#id-1.1-overview" id="id-1.1-overview"></a>

To enable document reviews within a policy, a corresponding button must be made available in the grid. (This button is combined with the document view function.)

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FkbkSmJhnjW1PAlsDTBKX%2Fimage.png?alt=media&#x26;token=1daf0e1d-3213-4d3a-b6d2-e3161d27b805" alt=""><figcaption></figcaption></figure>

This button will appear in the grid for documents, showing a number of existing comments for each of them.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FVjmjxjggS7rvXS7RXWCN%2Fimage.png?alt=media&#x26;token=59a36512-3c90-4a2a-802e-9918e6f4d245" alt=""><figcaption></figcaption></figure>

### 1.2 Discussions <a href="#id-1.2-discussions" id="id-1.2-discussions"></a>

When opening a comments section a list of discussions is displayed. To create a comment, users must either select an existing discussion or create a new one.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FpfNp2VXF5WmWsXYPMDE8%2Fimage.png?alt=media&#x26;token=e8cd2fd2-f687-45b0-be49-5515085d3705" alt=""><figcaption></figcaption></figure>

### **1.2.1 Creating a Discussion**

To create a discussion several fields must be filled out:

**Discussion name** - arbitrary human readable name (usually used for indicating the topic of the discussion).

**Relationships** – references to other documents related to the current one.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2F5PEczQNa2Fc1DKrt8FaS%2Fimage.png?alt=media&#x26;token=1813aa43-0ebe-43fa-9a7c-f09127f247cc" alt=""><figcaption></figcaption></figure>

Selecting document in the ‘relationships’ will cause the discussion to be shown when viewing them as well.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FPU4oJFgk04e2nerVkYEx%2Fimage.png?alt=media&#x26;token=86b5f92a-cbe0-4cba-aae4-9867beb10bbb" alt=""><figcaption></figcaption></figure>

You can also link a discussion to a specific field in the document by adding a field reference.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FFs03YhNwqDvZ4EzCgW0n%2Fimage.png?alt=media&#x26;token=a4d92890-fcb2-42ae-829a-47001557bc54" alt=""><figcaption></figcaption></figure>

1. **Visibility Scope** The visibility scope determines who can see a given discussion.

a. **Public** – all users who have access to the document

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FQMmYVfl4ENSzgElwNADL%2Fimage.png?alt=media&#x26;token=391ac31c-39b1-4a73-bd10-de15d0b16d6f" alt=""><figcaption></figcaption></figure>

b. **Roles** – users with specific roles (and the creator of the discussion)

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FaUEy5TdPDon3C5bdZDTv%2Fimage.png?alt=media&#x26;token=8dee2b65-75f2-450e-a10d-9fb7d5d9d971" alt=""><figcaption></figcaption></figure>

c. **Users** – only specified users (and the creator of the discussion)

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2Fc8jRX39w1uA6E2l5g9u4%2Fimage.png?alt=media&#x26;token=7d5092e8-ced5-4f67-b28d-77c6b4d8e22e" alt=""><figcaption></figcaption></figure>

#### **1.2.2 Viewing**

You can search for the desired discussion using a **search** function.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FGIGji93wGloNdO37CBrD%2Fimage.png?alt=media&#x26;token=0d403155-d1e3-42f1-9e7c-13a88ee69570" alt=""><figcaption></figcaption></figure>

Also it is possible to search (filter) discussions based on their field links

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FEp9o8FbcUGywsrk361eu%2Fimage.png?alt=media&#x26;token=d6f1d760-e923-47c8-89a8-35420f1badf1" alt=""><figcaption></figcaption></figure>

The list of discussion participants can be viewed inside each discussion.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FJCROPNMlHxWngB6x8vef%2Fimage.png?alt=media&#x26;token=7e47dad0-e9b6-416d-bb33-ab9306d69ce8" alt=""><figcaption></figcaption></figure>

### 1.3 Messages <a href="#id-1.3-messages" id="id-1.3-messages"></a>

#### **1.3.1 User mentions**

Users can be mentioned in messages using @username notation.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FCckQxHImsEphvI0y0WkU%2Fimage.png?alt=media&#x26;token=3a7ca8d8-33f2-4125-ab5b-bb1fc7df6ab4" alt=""><figcaption></figcaption></figure>

#### **1.3.2 Field References**

Fields in a document can be referenced in messages using #fieldname notation.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FK40vTSBukcjsBion3Txd%2Fimage.png?alt=media&#x26;token=50e7d5fc-1000-4952-b7cb-8a1c156693b8" alt=""><figcaption></figcaption></figure>

Fields in a document can be referenced in messages also using the link button. 

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FJ82tQX0HkFxgPN1mJcwL%2Fimage.png?alt=media&#x26;token=b14632ce-12dc-4035-b688-a14765c694cc" alt=""><figcaption></figcaption></figure>

#### **1.3.3 Attachments**

Files can be attached to messages.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2F7dDpr3IzWSxCpM4f528q%2Fimage.png?alt=media&#x26;token=25447d50-3818-4bdc-a51e-26cbf1aa75e7" alt=""><figcaption></figcaption></figure>

Files, as well as messages, are encrypted and stored in IPFS.

Hedera Topics contain messages with meta-information and links to the corresponding document and attached files.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FMFplBaz4XPjXGSk3hBGc%2Fimage.png?alt=media&#x26;token=79733314-4484-498a-9e8c-b1bb97d1ea45" alt=""><figcaption></figcaption></figure>

## 2. Document Revisions <a href="#id-2.-document-revisions" id="id-2.-document-revisions"></a>

### 2.1 Configuration <a href="#id-2.1-configuration" id="id-2.1-configuration"></a>

To allow document revision, a corresponding button (requestVcDocumentBlock) must be added. To configure requestVcDocumentBlock to enable editing, the operation type must be set to Edit.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FKkaskglCIh1iK8W1OKj4%2Fimage.png?alt=media&#x26;token=d6d7b0e9-bdd7-4039-ad57-709c53c22005" alt=""><figcaption></figcaption></figure>

### 2.2 Events <a href="#id-2.2-events" id="id-2.2-events"></a>

As with creating a new document, editing a document revision triggers a standard event that saves a new version of the document.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2F9bXfEtXwD5KA9IzR7kWR%2Fimage.png?alt=media&#x26;token=472c0d2e-b86e-4570-8c31-b91bdf91af3c" alt=""><figcaption></figcaption></figure>

The old revision of the document is automatically marked as outdated. To hide ‘outdated’ revisions of the documents from the grid, enable “Hide previous versions.”  

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FEStiWK2aNVu8doar60FC%2Fimage.png?alt=media&#x26;token=6618cdd9-e9ad-4d04-bac6-2bc093faf812" alt=""><figcaption></figcaption></figure>

## 3. Access control <a href="#id-3.-access-control" id="id-3.-access-control"></a>

Since discussions are published encrypted, keys are required to access (e.g. for audits) their content - comments and attached documents.

### 3.1 Guardian user Permissions <a href="#id-3.1-guardian-user-permissions" id="id-3.1-guardian-user-permissions"></a>

To enable access to all policy artifacts, audit permission in the policy configuration must be assigned to the corresponding user/role.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FFr3MrDulWj2ekmcowkwo%2Fimage.png?alt=media&#x26;token=5384a478-d4bf-426e-8d2d-2af4d390a716" alt=""><figcaption></figcaption></figure>

### 3.2 Documents <a href="#id-3.2-documents" id="id-3.2-documents"></a>

Audit permission allows access to all documents within the policy.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FLfxWp1GQitMKaNtedOOW%2Fimage.png?alt=media&#x26;token=58034531-8ddb-4984-89bd-33094c6f9d4a" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FzmhKbkKqauvVJlE6dNwj%2Fimage.png?alt=media&#x26;token=a0747722-f99b-49ba-b30f-7a5633a8c4ec" alt=""><figcaption></figcaption></figure>

#### **3.3 Encryption keys**

Audit permission grants access to discussion encryption keys. These keys make it possible to decrypt messages within discussions for verification purposes.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FPaSuVljbz2z9bKkxxrwp%2Fimage.png?alt=media&#x26;token=cd3696d8-0b6e-4117-9dbb-c365571d2f0c" alt=""><figcaption></figcaption></figure>

## 4. Indexer view <a href="#id-4.-indexer-view" id="id-4.-indexer-view"></a>

Because discussion content is published encrypted, to view their content Indexer users need to provide the corresponding encryption keys.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FH3ilYc44mRu3Grq7G9yy%2Fimage.png?alt=media&#x26;token=929aefe0-6a5b-4b25-871e-e329eca06ac8" alt=""><figcaption></figcaption></figure>

When provided, keys are never stored. They are used solely within the current user session to decrypt messages encrypted with the corresponding key, which are automatically identified by the Indexer. 

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FofkZijegNMzZKhD9ZXtP%2Fimage.png?alt=media&#x26;token=4b104367-1372-4292-a05b-fedcd1a49f30" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FzZr1MymRbsQsgKYt8dEX%2Fimage.png?alt=media&#x26;token=81bb28fc-584b-4478-8243-bd6851747d2d" alt=""><figcaption></figcaption></figure>
