Skip to content

Commit f0b71ef

Browse files
authored
Add platform groups documentation (#9)
1 parent 7ab0d66 commit f0b71ef

File tree

3 files changed

+36
-19
lines changed

3 files changed

+36
-19
lines changed

docs/article_references.md renamed to docs/importing_articles.md

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
# Handling Article References
1+
# Handling Article Imports
22

3-
## Prerequisites
4-
Before tackling article references, you need to understand the [rich_text](./supported_types.md#rich_text) type.
3+
## Article mentions
54

6-
## What kind of references are supported?
7-
We support references to artifacts and articles. An inline attachment must be mapped to an artifact. A link to another article must be mapped to an article.
5+
### Prerequisites
6+
Before tackling article mentions, you need to understand the [rich_text](./supported_types.md#rich_text) type.
87

9-
## How to handle references?
8+
### What kind of mentions are supported?
9+
We support mentions to artifacts and articles. An inline attachment must be mapped to an artifact. A link to another article must be mapped to an article.
1010

11-
### Inline attachments
11+
### How to handle mentions?
12+
13+
#### Inline attachments
1214
If an inline attachment is hosted in the source system, it must be created as an artifact in DevRev. The same link cannot be used as the attachment will be deleted in the source system when our customers deactivate the account. However, creating an artifact is not enough. The artifact must linked in the appropriate place in the article content.
1315

14-
#### HTML
16+
##### HTML
1517
```
1618
<img src="don:core:dvrv-us-1:devo/0:artifact/1" alt="Alt Text"/>
1719
```
1820

19-
#### Markdown
21+
##### Markdown
2022
```
2123
![Alt Text](don:core:dvrv-us-1:devo/0:artifact/1)
2224
```
2325

24-
#### Example
26+
##### Example
2527
Let's say the content of your external system looks like this:
2628
```
2729
<p>This is an article with one image.</p>
@@ -47,17 +49,17 @@ To achieve this, you need to transform the content of the article to this:
4749
"\" alt=\"download.jpeg\"></p>"
4850
]
4951
```
50-
The ref_type should be set to artifact and the ID should be the ID of the attachment in the external source system. The platform simply replaces the reference block with the ID of the corresponding artifact. The resolved value in not wrapped in double quotes.
52+
The ref_type should be set to artifact and the ID should be the ID of the attachment in the external source system. The platform simply replaces the mention block with the ID of the corresponding artifact. The resolved value is not wrapped in double quotes.
5153

52-
### Links to other articles
53-
If there is a link to another article in the content of the article, you need to create a reference to the article. The link must be to an article that was either created in previous syncs or will be created in the current sync. At the extractor stage, it is impossible to predict the ID of the article that will be created in DevRev. So, this must be handled by the platform. This feature is only available for HTML format. However, since Markdown can contain HTML, you can use the same approach for Markdown as well.
54+
#### Links to other articles
55+
If there is a link to another article in the content of the article, you need to create a mention to the article. The link must be to an article that was either created in previous syncs or will be created in the current sync. At the extractor stage, it is impossible to predict the ID of the article that will be created in DevRev. So, this must be handled by the platform. This feature is only available for HTML format. However, since Markdown can contain HTML, you can use the same approach for Markdown as well.
5456

55-
#### HTML
57+
##### HTML
5658
```
5759
<a data-article-id="don:core:dvrv-us-1:devo/0:article/10" href="/ART-10" target="_self">Contact our Support Team</a>
5860
```
5961

60-
#### Example
62+
##### Example
6163
Let's say the content of your external system looks like this:
6264
```
6365
<p>You can create an account and log-in <a href="https://devrev.zendesk.com/hc/en-us/articles/360059607772" target="_self">only</a> with the company email.
@@ -81,4 +83,8 @@ To achieve this, you need to transform the content of the article to this:
8183
"\" target=\"_self\"> only</a> with the company email."
8284
]
8385
```
84-
The ref_type should be set to the item type in the external system that is being mapped to articles. For example, if you're importing documents from the external system as articles, the `ref_type` should be set to documents. The ID should be the ID of the item in the external source system. The platform replaces the reference block with the ID of the corresponding article in DevRev as well as adds the href attribute with the appropriate value.
86+
The ref_type should be set to the item type in the external system that is being mapped to articles. For example, if you're importing documents from the external system as articles, the `ref_type` should be set to documents. The ID should be the ID of the item in the external source system. The platform replaces the mention block with the ID of the corresponding article in DevRev as well as adds the href attribute with the appropriate value.
87+
88+
## Managing Permissions
89+
90+
You can manage permissions in the `shared_with` field. Permissions can reference users, groups and [platform groups](./platform_groups.md).

docs/platform_groups.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Mapping Platform Groups
2+
3+
## Overview
4+
This document outlines the process for developers to map their external default groups to internal platform groups using the new mapping object. This functionality allows for flexible integration with the platform's permission system while allowing for re-mapping by the end user. You are able to map to groups created by default by the DevRev platform, for example to the *Dev users* and the *Rev users* groups.
5+
6+
## Implementation Guide
7+
8+
1. Developers need to create a mapping between their external default groups and the platform's internal default groups using a new mapping object.
9+
- To do this define a new object in external metadata.
10+
- The object should have one enum field with the possible values being the default groups available in external system.
11+
2. Developers can use IDM to map their object to the platform groups object in devrev (e.g.: to dev users and rev users groups).
12+
3. The platform groups object can be referenced in other objects, for example in the shared_with field of articles.

docs/supported_types.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ DevRev supports the following types:
1717
- Rich text is used in DevRev to represent text fields that can be formatted and can contain mentions. Eg.: description of an issue, body of a conversation, etc.
1818
- A simple rich text looks like one markdown string wrapped in an array: `["Hello **world**!"]`.
1919
Markdown should be compatible with [CommonMark Spec v0.30](https://spec.commonmark.org/0.30).
20-
- To support mentions `rich_text` can be formatted as an array of strings and mention objects. The field should also use the *use rich text* transformation method.
21-
- Example of a simple mention object:
20+
- To support mentions `rich_text` can be formatted as an array of strings and mention objects like so:
2221
```json
2322
[
2423
"Hello ",
@@ -47,7 +46,7 @@ DevRev supports the following types:
4746
]
4847
}
4948
```
50-
- Articles support Markdown as well as HTML. For more details, refer to [article references](article_references.md).
49+
- Articles support Markdown as well as HTML. For more details, refer to [article mentions](./importing_articles.md).
5150

5251
- `reference`: IDs referring to another record. References have to declare what they can refer to,
5352
which can be one or more record types (`#record:`) or categories (`#category:`).

0 commit comments

Comments
 (0)