【Datagear】How to add Admin to Datagear

【background】

By default, Datagear only sets up one Admin, which can complete various management operations of the user, and has full editing rights to all data sources, datasets, charts, and panels.

【question】

Only one Admin is not enough in many scenarios. However, the application setting itself does not provide an entry for adding an Admin user, nor does it have an Admin role that can be assigned directly.

【Thinking】

Directly modify Datagear's built-in derby database.

【operate】

First of all, find a tool. Among all the database table visualization tools, only dbeaver is found to be able to connect to the derby embedded database.
This is an open source tool, download directly from the official website:
https://dbeaver.io/download/

After downloading, decompress and there is an Exe. After double-clicking, a graphical interface will appear. Click New Connection, select all types, and then find the derby embedded type.
insert image description here
Click Next to start DB setup. Because it is embedded, you only need to select the derby folder under the .datagear folder of datagear under the user directory of the c disk, and fill in the default admin for the user name and password.
insert image description here

After completing the settings, expand derby, and it may automatically let you download the required driver, just click to download. If it cannot be downloaded, it is a network problem. Find a way to unblock the network. After the download is complete, expand the derby database, and you can already see the content at this time.
insert image description here
Expand the APP, double-click the User table, the specific content of the User table will appear, click the data, find the ID you want to become Admin, and set the Admin column to True.
insert image description here

【addition】

Sometimes datagear is on the internal network, and there is no Internet access to make tools. It doesn't matter, just copy the derby folder to the external network machine, modify it and copy it back. Essentially it is a set of files.

[Addition 2]

The Admin permission has been re-granted in the production environment, please log in to verify it yourself.
This time, I discovered that because I bypassed the scope of the system design itself and modified the management rights granted to you by the embedded database, the specially empowered administrators will lose their original management rights after changing their passwords.
Because the authorization bypasses the system, the operation is cumbersome and requires a version change to take effect (the service needs to be suspended). According to this experience, as an administrator with special authorization, please do not change the password in the future. If you really need to modify it, you need to notify me to re-operate (it takes about an hour to operate around today).

Guess you like

Origin blog.csdn.net/weixin_41697242/article/details/131006731