Skip to main content
Skip table of contents

Configure Folders and Shared Tables

If you wish, you can allow SuperWEB2 users to save tables and custom data that are accessible to other SuperWEB2 users. To use this feature, you need to create folders in SuperADMIN, and set permissions on those folders to control who can access the folders.

You can also use SuperADMIN to upload and manage tables in shared folders.

In order to use the folders and tables feature you must set up the user data repository (UDR) to use a relational database to store user data. The H2 user repository database that is supplied as part of the default SuperWEB2 installation does not support saving tables to the UDR.

Create a Folder

To create a new folder in SuperADMIN, use the cat command.

For example, the following command creates a new folder with the ID sharedfolder in the top level of the dataset catalogue:

CODE
> cat addfolder sharedfolder "Shared User Tables"
Added folder 'sharedfolder' to databaseCatalog 'root'
>

The display name for this folder has been set to Shared User Tables. This display name will appear in SuperWEB2 when users are saving and loading tables and custom data from this folder. For example:

Selecting the Shared User Tables option within the Save Tables dialog

Set Folder Permissions

Once you have created a folder, you will need to set permissions to control who can access this folder:

No PermissionsIf users or groups do not have read permissions for a particular folder, then they will not see the folder (or any of the saved tables and custom data inside the folder) in SuperWEB2.
Read Permissions

If users or groups have read permissions, then they will be able to load any saved tables and custom data that other users have created in this folder.

Read and Write Permissions

If users or groups have read and write permissions, then they will be able to save tables and custom data to the folder, in addition to loading tables and custom data from this folder.

Users with read and write permissions will also be able to delete any of the shared tables in that folder (even if someone else originally created the table).

Folder permissions work in conjunction with dataset permissions, so users will only be able to access saved tables or custom data if they also have access to the corresponding dataset.

Use the account command to create your users and groups (if you have not already done so) and then use the cat command to give permissions to the individual users and groups.

For example, the following command gives the user jsmith permission to load tables and custom data that have been saved to the Shared User Tables folder by other users:

CODE
> cat sharedfolder access jsmith read true

The following commands give the group tablecreators permission to load tables and custom data that have been saved to the Shared User Tables folder, and also create new tables and custom data in this folder:

CODE
> cat sharedfolder access tablecreators read true
> cat sharedfolder access tablecreators write true

Upload and Manage Tables in Shared Folders

You can also use SuperADMIN to upload a saved TXD to the catalogue, as well as view and manage tables that have been saved by users from inside SuperWEB2.

Use the cat command to upload and manage saved tables.

Upload a Saved Table to the Catalogue

  1. Use SuperCROSS to define the structure of the table, and save it in Textual Table Definition (.TXD) format.
  2. Login to SuperADMIN and run the following command:

    CODE
    cat [ <folder_id> ] addtable <table_id> [ <display_name> ] <path_location>

    Replace:

    • <folder_id> with the ID of the folder you want to add the table to (or omit this to add it to the root level of the catalogue)

    • <table_id> with a unique ID of your choice for this table
    • <display_name> with the name of the table (this will be displayed in the Catalogue and Saved Tables in SuperWEB2)
    • <path_location> with the location of the TXD file on your local disk

    For example:

    CODE
    cat sharedfolder addtable mynewtable "Account Profit by Gender" C:\TXDs\AccProfitByGender.txd

Note when SuperADMIN and SuperWEB2 are Running Separately

If SuperADMIN and SuperWEB2 are running on different machines, then you need to ensure that SuperADMIN has been configured so that it can locate the correct SuperWEB2 instance when uploading the table. If you receive an error message similar to the following, SuperADMIN is not configured correctly: 

CODE
> cat addtable "TableID" "Table Name" C:\TXD\SavedTable.txd
Error: akka.stream.StreamTcpException: Tcp command [Connect(localhost:8080,None,List(),Some(10 seconds),true)] failed because of Connection refused

To resolve this, you can either:

  • Set the value of publicBaseResourceUrl in the SuperWEB2 web.xml configuration file. This will permanently resolve the issue, but requires a restart of SuperWEB2 to take effect.
  • Run the following command in SuperADMIN: connection superweb2 <url> (please note that this applies to the current SuperADMIN session only). See connection for more details.

Move a Table between Folders

You can use the cat command to move a table to a different folder (replace <table_id> with the ID of the table you want to move, and folder_id> with the ID of the destination folder):

CODE
cat <table_id> move <folder_id>

To move a table to the root folder, use root as the <folder_id>. For example:

CODE
cat myTable move root

Review the List of Tables in a Folder

You can also use the cat command to check which tables are in a particular folder:

CODE
cat [ <folder_id> ] tables

You can omit the folder ID if you want to get a list of tables in the root folder.

Remove a Table

You can delete a table from the repository using the following command:

CODE
cat <table_id> remove

You can use this command to delete tables you have uploaded, as well as tables that have been added by SuperWEB2 users. Tables created within SuperWEB2 are automatically assigned an ID. You can find out what this is using the cat [ <folder_id> ] tables command.

Rename a Table

Use the following command to rename a table in the repository:

CODE
cat <table_id> displayname <new_display_name>

This command changes the name that is displayed to users in SuperWEB2.

Note about Deleting Folders and Reuse of Folder IDs

There is currently a known issue relating to what happens when a folder is deleted: although any tables that were in the folder at the time of deletion will no longer be accessible to SuperWEB2 users, the table definitions will remain in the user data repository database.

If you subsequently create another folder with the same ID as the deleted folder, the tables from the previous folder may become available again in SuperWEB2.

For this reason, you are recommended not to reuse IDs from previously deleted folders when creating new folders. The problem only occurs when IDs are reused; you can use the same display name as a previously deleted folder and the issue will not occur (as long as the ID is different).

This issue will be resolved in a future release.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.