Skip to content

Commit 8f4e0da

Browse files
Openblocks-docsgitbook-bot
Openblocks-docs
authored andcommittedDec 16, 2022
GitBook: [#73] update docs: "Permissions for resources"
1 parent 34f823d commit 8f4e0da

16 files changed

+64
-38
lines changed
 
92.7 KB
Loading

‎docs/.gitbook/assets/image (1).png

-92.7 KB
Loading
307 KB
Loading
68.1 KB
Loading
1.15 KB
Loading

‎docs/.gitbook/assets/permission-1.png

459 KB
Loading
Loading
Loading

‎docs/build-apps/event-handlers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
In Openblocks, event handlers are responsible for collecting and processing events from components and queries, and executing subsequent actions. For example, for a **Button** component, you can add an event handler to trigger the **Run query** action **** in response to the button **Click** event.
44

5-
<figure><img src="../.gitbook/assets/image (8) (1).png" alt=""><figcaption></figcaption></figure>
5+
<figure><img src="../.gitbook/assets/image (19).png" alt=""><figcaption></figcaption></figure>
66

77
Set event handlers wisely to provide a reactive and responsive user experience (UX). For example, triggering a **get-all** query after **insert-new-data** query finishes enables table automatically refresh.
88

@@ -32,7 +32,7 @@ Running a query can result in success or failure, so queries have two events: **
3232

3333
There are a number of event handler actions available in Openblocks for handling different scenarios. Set them in the **Action** dropdown list in an event handler.
3434

35-
![](<../.gitbook/assets/image (9) (1).png>)
35+
![](<../.gitbook/assets/image (1) (1).png>)
3636

3737
{% hint style="info" %}
3838
See [advanced](event-handlers.md#advanced) on this page to know advanced settings.
@@ -48,7 +48,7 @@ Trigger the selected query.
4848

4949
To control a component, select a component in the **Component** dropdown list and call one of its methods in the **Method** dropdown list.
5050

51-
![](<../.gitbook/assets/image (29).png>)
51+
![](<../.gitbook/assets/image (17).png>)
5252

5353
### Set temporary state
5454

‎docs/build-apps/module.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ When building an app, you want to reuse components and queries across different
44

55
<figure><img src="../.gitbook/assets/module-1.png" alt=""><figcaption><p>Build a <a href="module.md#demo-a-statistics-module">statistics module</a></p></figcaption></figure>
66

7-
<figure><img src="../.gitbook/assets/module-2 (1).png" alt=""><figcaption><p>Reuse this module anywhere</p></figcaption></figure>
7+
<figure><img src="../.gitbook/assets/module-2.png" alt=""><figcaption><p>Reuse this module anywhere</p></figcaption></figure>
88

99
## Module basics
1010

@@ -45,7 +45,7 @@ The other areas of the module editor are similar to those of the web app editor.
4545

4646
When editing an app or module, select **Insert > Extensions > Modules** to display the modules that you have access to.&#x20;
4747

48-
<img src="../.gitbook/assets/module-10.jpeg" alt="" data-size="original">
48+
<img src="../.gitbook/assets/module-10.png" alt="" data-size="original">
4949

5050
Then drag and drop the module onto the canvas, and set input parameters, change styles inside the module's **Properties** panel.
5151

@@ -67,7 +67,7 @@ Module inputs are parameters passed to the module from external apps. The suppor
6767

6868
This section guides you through the steps to build a statistics module and reuse it in an app. &#x20;
6969

70-
<figure><img src="../.gitbook/assets/module-2 (1).png" alt=""><figcaption></figcaption></figure>
70+
<figure><img src="../.gitbook/assets/module-2.png" alt=""><figcaption></figcaption></figure>
7171

7272
1. Create module inputs:
7373

@@ -86,7 +86,7 @@ This section guides you through the steps to build a statistics module and reuse
8686
<figure><img src="../.gitbook/assets/module-17.png" alt=""><figcaption></figcaption></figure>
8787
5. Reuse the module multiple times by passing different input values.&#x20;
8888

89-
<figure><img src="../.gitbook/assets/module-2 (1).png" alt=""><figcaption></figcaption></figure>
89+
<figure><img src="../.gitbook/assets/module-2.png" alt=""><figcaption></figcaption></figure>
9090

9191
#### Input Test
9292

‎docs/build-apps/use-third-party-libraries.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,25 +68,25 @@ https://unpkg.com/cowsay@1.5.0/build/cowsay.umd.js
6868

6969
### Import on App-level
7070

71-
Navigate to the left sidebar, click <img src="../.gitbook/assets/image (1) (2).png" alt="" data-size="line"> > **Other** > **Scripts and style** > **Add a library**. Then paste the **cowsay** link here.
71+
Navigate to the left sidebar, click <img src="../.gitbook/assets/image (1).png" alt="" data-size="line"> > **Other** > **Scripts and style** > **Add a library**. Then paste the **cowsay** link here.
7272

73-
<figure><img src="../.gitbook/assets/Add a library (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
73+
<figure><img src="../.gitbook/assets/Add a library (2).png" alt=""><figcaption></figcaption></figure>
7474

7575
Now you can write code in **JS query** to test its usage with `cowsay.say`:
7676

77-
<figure><img src="../.gitbook/assets/write code in JS query (1) (1).png" alt=""><figcaption></figcaption></figure>
77+
<figure><img src="../.gitbook/assets/write code in JS query (2).png" alt=""><figcaption></figcaption></figure>
7878

7979
or in component **Properties**:
8080

81-
<figure><img src="../.gitbook/assets/or in Properties (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
81+
<figure><img src="../.gitbook/assets/or in Properties (2).png" alt=""><figcaption></figcaption></figure>
8282

8383
And since you have set up cowsay just for **Openblocks's new application 1,** you can not use cowsay in another app.
8484

85-
<figure><img src="../.gitbook/assets/in another app (1) (1).png" alt=""><figcaption></figcaption></figure>
85+
<figure><img src="../.gitbook/assets/in another app (1).png" alt=""><figcaption></figcaption></figure>
8686

8787
### Import on Workspace-level
8888

8989
Navigate to **Workspace settings** > **Advanced** > **JavaScript library** > **Add a library**. Then paste the **cowsay** link here and click **Save**. Now you can use **cowsay** library **** in any app of your workspace.\
90-
![](<../.gitbook/assets/Import on Workspace-level libraries (1) (1) (1).png>)
90+
![](<../.gitbook/assets/Import on Workspace-level libraries (1).png>)
9191

92-
<figure><img src="../.gitbook/assets/Import on Workspace-level libraries-advanced (1).png" alt=""><figcaption></figcaption></figure>
92+
<figure><img src="../.gitbook/assets/Import on Workspace-level libraries-advanced.png" alt=""><figcaption></figcaption></figure>

‎docs/data-sources/connect-to-databases/google-sheets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Navigate back to to [Google Sheets](https://docs.google.com/spreadsheets), and f
3737
1. Open the JSON file of the key.
3838
2. Copy the value of `client_email`, which is an identity used for access management of your sheet.
3939

40-
<figure><img src="../../.gitbook/assets/Google-sheets-key-client-email.jpeg" alt=""><figcaption></figcaption></figure>
40+
<figure><img src="../../.gitbook/assets/Google-sheets-key-client-email (1).jpeg" alt=""><figcaption></figcaption></figure>
4141
3. Click **Share** at the top right and paste the copied `client_email` value to add a member with access.
4242

4343
<figure><img src="../../.gitbook/assets/Google-sheets-share.jpg" alt=""><figcaption></figcaption></figure>

‎docs/data-sources/data-source-basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Follow the steps below:
1515
1. Click **Data Sources** on Openblocks homepage.
1616
2. Click **New data source** on the upper right. This permission is restricted to workspace admins and developers.
1717

18-
<figure><img src="../.gitbook/assets/image (31) (1).png" alt=""><figcaption></figcaption></figure>
18+
<figure><img src="../.gitbook/assets/image (12) (1).png" alt=""><figcaption></figcaption></figure>
1919
3. Select the database or API type you need to connect.&#x20;
2020

2121
<figure><img src="../.gitbook/assets/data source basics-2.png" alt=""><figcaption></figcaption></figure>

‎docs/queries/query-basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Queries support you to read data from or write data to your data sources. You ca
66

77
You can connect to a data source that was already in your data source library or create a new one. For detailed information, see [data-source-basics.md](../data-sources/data-source-basics.md "mention").
88

9-
<figure><img src="../.gitbook/assets/image (12) (1).png" alt=""><figcaption></figcaption></figure>
9+
<figure><img src="../.gitbook/assets/image (31) (1).png" alt=""><figcaption></figcaption></figure>
1010

1111
## Create a query
1212

‎docs/self-hosting/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ By default the supervisor will run under the user `uid=9001`. You can specify th
111111
{% tabs %}
112112
{% tab title="Docker-Compose" %}
113113
Add an environment variable `LOCAL_USER_ID` in `docker-compose.yml` downloaded in your working directory.\
114-
<img src="../.gitbook/assets/local-user-id.png" alt="" data-size="original">
114+
<img src="../.gitbook/assets/local-user-id (2).png" alt="" data-size="original">
115115
{% endtab %}
116116

117117
{% tab title="Docker" %}
Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,73 @@
11
---
22
description: >-
3-
Manage permissions for apps, modules, queries, data sources, and folders in
4-
your workspace.
3+
Manage permissions for apps, modules, navigations, folders, query library, and
4+
data sources in your workspace.
55
---
66

77
# Permissions for resources
88

9-
Openblocks implements [Role-based Access Control](https://en.wikipedia.org/wiki/Role-based\_access\_control) (RBAC) by assigning a set of permissions to different roles. These permissions determine the actions users can take on resources, including apps, modules, queries, data sources, and folders.&#x20;
9+
Openblocks implements [Role-based Access Control](https://en.wikipedia.org/wiki/Role-based\_access\_control) (RBAC) by assigning a set of permissions to different roles. These permissions determine the actions users can take on resources, including apps, modules, navigations, folders, query library, and data sources.&#x20;
1010

11-
Only workspace admins and members of Developers group are allowed to create resources. For workspace admins, they are in fact the owner of all resources.
11+
Only workspace admins and members of **Developers** group are allowed to create resources. For workspace admins, they are in fact the owner of all resources.
1212

13-
## Apps and modules
13+
## Apps, modules, **navigations**
14+
15+
The permissions for these three resources are the same.
16+
17+
<figure><img src="../.gitbook/assets/permission-1.png" alt=""><figcaption></figcaption></figure>
1418

1519
### Share and set roles
1620

17-
App owners can add members to app and assign different roles to them. In a web app or module editor, click **Share** at the top right, then click **Add members**.
21+
The owners of apps, modules and navigations can add members and assign different roles to them. When editing a web app, a module or a navigation, click **Share** at the top right, then click **Add members**.
1822

1923
<figure><img src="../.gitbook/assets/share-add-members.png" alt=""><figcaption></figcaption></figure>
2024

21-
Choose members and groups in the list and set roles for them.
25+
Choose members and groups from the list and set roles for them.
2226

2327
![](../.gitbook/assets/roles-1.png)![](../.gitbook/assets/roles-2.png)
2428

2529
The available roles and their corresponding permissions are listed in the table below.
2630

27-
| Role | Permissions |
28-
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
29-
| <ul><li>Viewer</li></ul> | <ul><li>View the app, or use the module</li></ul> |
30-
| <ul><li>Editor</li></ul> | <ul><li>View the app, or use the module</li><li>Rename</li><li>Edit</li><li>Release</li><li>Export</li></ul> |
31-
| <ul><li>Owner</li></ul> | <ul><li>All permissions of <strong></strong> Editor</li><li>Delete the app or module</li><li>Set roles for members</li></ul> |
31+
| Role | Permissions |
32+
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
33+
| <ul><li>Viewer</li></ul> | <ul><li>View and use the app, module and navigation</li></ul> |
34+
| <ul><li>Editor</li></ul> | <ul><li>View and use the app, module and navigation</li><li>Rename</li><li>Edit</li><li>Publish</li><li>Duplicate</li><li>Export</li></ul> |
35+
| <ul><li>Owner</li></ul> | <ul><li>All permissions of <strong></strong> Editor</li><li>Delete the app or module</li><li>Set roles for members</li></ul> |
3236

33-
### Make app public
37+
### Make public
3438

35-
If you want to make an app public and accessible to all users (including anonymous users), you can toggle the **Make the app public** switch in **Share** settings.
39+
If you want to make an app or a module or a navigation public to all users (including anonymous users), you can toggle on **Make the app public** in **Share** settings.
3640

3741
![](<../.gitbook/assets/image (22).png>)
3842

43+
## Folder
44+
45+
Folders help you sort out the apps, modules, and navigations in the workspace. Only workspace **admins** and members of **Developers** group have the following permissions for folders:
46+
47+
* Create
48+
* Rename
49+
* Delete
50+
* Move the apps, modules and navigations into or out of folders
51+
3952
## Data sources
4053

41-
In Openblocks, members with permissions to use, edit and delete data sources **** are listed as follows:
54+
Only workspace admins and developers can view the **Data Sources** page and create new data sources.
55+
56+
For each data source, workspace admins and the creator can change its **Access Control**. Go to Openblocks homepage > **Data Sources**, and click `···` > **Access Control**.
57+
58+
<figure><img src="../.gitbook/assets/permission-date source-1.png" alt=""><figcaption></figcaption></figure>
59+
60+
In **Access Control** settings, add members or groups from the workspace, and then choose their roles (**Can use** or **Can manage**).
61+
62+
&#x20;![](<../.gitbook/assets/permission-date source-2.png>)
63+
64+
The permissions of these two roles are listed in the following table:
65+
66+
| Role | Permissions |
67+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
68+
| <ul><li>Can use</li></ul> | <ul><li>Use data source when editing an app/module/navigation/library query</li></ul> |
69+
| <ul><li>Can manage</li></ul> | <ul><li>Use data source when editing an app/module/navigation/library query</li><li>Edit data source</li><li>Delete data source</li><li>Manage data source permission roles</li></ul> |
70+
71+
## Query library
4272

43-
* **Edit** or **Delete**
44-
* Data source creators and workspace admins.
45-
* **Use**
46-
* Workspace admins and developers.
47-
* Members with permissions to edit an app are automatically granted access to use data sources already used in the app.
73+
Workspace admins and members of developers group can create query library in Openblocks. And they have read, write, use and delete permissions for queries if they can use the query's corresponding data source.

0 commit comments

Comments
 (0)
Please sign in to comment.