Skip to content

Roles and Permissions

1.0 Enterprise Edition

In SeaTable Enterprise Edition, user roles determine a user's permissions and quotas, and administrator roles determine what an administrator can do in the system administration. The two are independent: a system administrator has both a user role and an administrator role, and the user role still governs what they can do in bases and groups.

All changes relating to the SeaTable's roles are done in the configuration file dtable_web_settings.py.

User Roles

A user role is comprised of permissions and quotas.

Values not set in a role are taken from the built-in role default

If a permission or quota is not set in a role, SeaTable does not assume True or "no limit". It takes the value from the built-in definition of the role default (see Standard User Roles). Most permissions are True there, but not all of them, e.g. can_invite_guest is False.

Changes you make to the role default in dtable_web_settings.py are not passed on to other roles. Every other role keeps inheriting the built-in values. If a change shall apply to several roles, set it in each of them.

User Permissions

The following permissions are supported in user roles:

Permission Added in version Permission to ... Additional information
can_add_dtable 1.0 Create bases If set to False, the user cannot create bases, neither under "My bases" nor in groups.
can_add_group 1.0 Create groups If set to False, the user cannot create groups. The permission can_add_dtable is necessary to create bases inside a group.
can_use_global_address_book 1.0 Search all users of the system If set to False, a user searching for other users (e.g. when sharing a base) only finds a user by entering the exact email address. Only applies if CLOUD_MODE is not enabled. Default: True; False for the role guest.
can_invite_guest 1.0 Invite guests by email Invited users get the role guest. Requires ENABLE_GUEST_INVITATION = True in dtable_web_settings.py. Default: False.
can_generate_external_link 1.0 Create external links If set to False, the user cannot create external links. (The menu item "External link" in the share dialog is hidden.)
can_create_common_dataset 1.0 Create common datasets (CDS) If set to False, the user cannot create CDS.
can_use_advanced_permissions 1.1 Use advanced permissions Advanced permissions include table permissions, column permissions, view share, custom sharing permissions, and row locking.
can_run_python_script 1.4 Run Python scripts If set to False, the action "Run script" in the button column and "Run script" in the script side panel are disabled; in automation rules, the action "Run Python script" is not available. The execution of Python scripts requires the installation of Python Pipeline. Does not apply to org users and group bases.
can_use_advanced_customization 2.0 Use advanced customizations Advanced customization includes custom team logo, custom form logo, custom URL for forms and app, base security settings, and role permissions in apps.
can_use_external_app 2.2 Create and manage apps If set to False, the user cannot create apps or access apps in edit mode. (The app-icon is hidden in the base.)
can_use_automation_rules 2.2 Create and manage automation rules If set to False, the user cannot create or modify automation rules. (The menu item "Automation rules" is hidden in the base.) Does not apply to org users and group bases.
can_archive_rows 2.3 Manage big data and move rows into the big data storage If set to False, the user cannot enable/disable big data management in a base, nor can the user move rows into the big data storage; if set to False, but big data is enabled in a base, the user can create and access big data views as well as unarchive rows.

User Quotas

The following quotas are supported in user roles:

Quota Added in version Description Additional information
role_asset_quota 1.0 Total storage quota for all personal bases: '1G' means a limit of one gigabyte for files and images (assets); '' means no storage quota for assets Assets in shared bases owned by another user and assets in group bases do not count against the storage quota. Does NOT apply to org users.
row_limit 1.0 Total row limit for all personal bases: 10000 means a limit of 10 000 rows; -1 means no row limit Rows in shared bases owned by another user, rows in group bases, and rows in the big data storage do not count against the row limit. Does NOT apply to org users.
big_data_row_limit 3.1 Total row limit in big data storage for all bases: 100000 means a limit of 100 000 rows This item is used for the role of teams rather than users. Does NOT apply to org users.
big_data_storage_quota 4.3 Total storage quota for all bases in big data storage: '1G' means a limit of one gigabyte; '' means no storage quota for big data storage. Assets in rows in the big data storage do not count against this quota. This item is used for the role of teams rather than users. Does NOT apply to org users.
scripts_running_limit (Deprecated) 2.3 Total number of Python scripts run within a month: 100 means 100 script runs per month; -1 means unlimited script runs The script run counter is reset at the beginning of every month. This quota can only be configured up until (and including) version 6.1.
scripts_running_limit_per_user 6.2 The maximum number of Python script runs per user per month. In team mode, the total number of script runs within the team will be shared. -1 allows for an unlimited number of script runs. The script run counter is reset at the beginning of every month.
snapshot_days 2.1 Retention period for snapshots in days: 180 means a storage period of 180 days; no value means an unlimited retention period Snapshots older than the retention period are automatically removed.
share_limit Max number of users a base can be shared with: 100 means a base can be shared with 100 users
ai_credit_per_user 6.0 The maximum AI quota allowed per user per month (i.e., the maximum amount of tokens that can be used in a single month, converted into an amount. In team mode, the total quota within the team will be shared). -1 means unlimited quota.
monthly_automation_limit_per_user 6.1 The maximum number of automation executions per user per month. In team mode, the total number of allowed executions within the team will be shared. -1 allows for an unlimited number of executions.
monthly_api_call_limit_per_user 5.3 The maximum number of API calls per user per month. In team mode, the total number of API calls within the team will be shared. -1 allows for an unlimited number of API calls. A limit the system admin sets for an individual user or team in the system administration takes precedence over the value of the role.

Standard User Roles

SeaTable has two standard, preconfigured user roles default and guest. They can be used in the Users' section of the system administration without prior configuration.

The standard user roles are defined as follows:

ENABLED_ROLE_PERMISSIONS = {
    'default': {
        'ai_credit_per_user': -1,
        'big_data_storage_quota': '',
        'can_add_dtable': True,
        'can_add_group': True,
        'can_archive_rows': True,
        'can_create_common_dataset': True,
        'can_generate_external_link': True,
        'can_invite_guest': False,
        'can_run_python_script': True,
        'can_use_advanced_customization': True,
        'can_use_advanced_permissions': True,
        'can_use_automation_rules': True,
        'can_use_external_app': True,
        'can_use_global_address_book': True,
        'monthly_api_call_limit_per_user': -1,
        'monthly_automation_limit_per_user': -1,
        'role_asset_quota': '',
        'role_quota': '',
        'row_limit': -1,
        'scripts_running_limit_per_user': -1,
        'share_limit': 100,
        'snapshot_days': 180
    },
    'guest': {
        'ai_credit_per_user': -1,
        'big_data_storage_quota': '',
        'can_add_dtable': False,
        'can_add_group': False,
        'can_archive_rows': True,
        'can_create_common_dataset': True,
        'can_generate_external_link': True,
        'can_invite_guest': False,
        'can_run_python_script': True,
        'can_use_advanced_customization': True,
        'can_use_advanced_permissions': True,
        'can_use_automation_rules': True,
        'can_use_external_app': True,
        'can_use_global_address_book': False,
        'monthly_api_call_limit_per_user': -1,
        'monthly_automation_limit_per_user': -1,
        'role_asset_quota': '',
        'role_quota': '',
        'row_limit': -1,
        'scripts_running_limit_per_user': -1,
        'share_limit': 100,
        'snapshot_days': 30
    },
}

If you want to modify the permissions and quotas of either or both standard roles, copy-and-paste the above codeblock into dtable_web_settings.py and modify as per your needs. Restart SeaTable for the changes to take effect.

Custom User Roles

Enterprise Edition

You can add additional user roles by extending the codeblock in dtable_web_settings.py. A custom user role inherits all permissions and quotas of the built-in role default as shown above; you only need to list the values that shall differ.

To add a role employee, for example, add the following lines (beginning at 'employee' and ending at }, ) to the existing role definition.

ENABLED_ROLE_PERMISSIONS = {
    'employee': {
        'can_add_dtable': True,
        'can_add_group': False,
        'can_create_common_dataset': False
    },
}

Restart SeaTable for the new role to become available in SeaTable.

Roles in Multi-Tenancy Setups

Enterprise Edition

If teams/organizations are enabled, the system admin can assign a role not only to a user but also to a team. Both are roles from ENABLED_ROLE_PERMISSIONS; there is no separate configuration for team roles. Only the system admin can assign roles. Team admins cannot change the role of their team or of its members.

Which Role Applies to a Team Member

For a team member, SeaTable uses exactly one role, chosen in this order of priority:

  1. The user's role, if the user has a role other than default.
  2. The team's role, if the user has no role or the role default.
  3. The role org_default, if neither the user nor the team has a role assigned.

The roles are not combined permission by permission: the role that applies replaces the others completely.

Example: The team has the role business with 'can_add_dtable': True. A member of this team has the custom role restricted with 'can_add_dtable': False. This member cannot create bases, because only the role restricted applies to the member.

For team members, default means 'use the team's role'

A team member with the role default never receives the permissions of the role default. The team's role applies instead. If a single team member needs the permissions of default while the rest of the team uses a different role, create a custom role with the desired values and assign it to this member.

Permissions Determined by the Team's Role Only

Some permissions are not checked for the user who works in a base, but for the owner of the base. If a base belongs to a team, which applies to all group bases and personal bases of team members, only the team's role counts. The role of the user is ignored for these permissions:

  • can_run_python_script
  • can_use_automation_rules
  • can_use_advanced_permissions
  • can_use_external_app
  • can_use_advanced_customization
  • can_archive_rows

Consequently, you cannot use a user role to take away these permissions from a single team member, or to grant them.

Team Quotas

Row limit, asset quota and big data row limit of a team are taken from the quotas the system admin sets for the team. If no value is set there, SeaTable uses row_limit, role_asset_quota and big_data_row_limit of the team's role.

The Role org_default

A team without an explicitly assigned role uses the built-in role org_default. It is defined as follows; all values not listed here are taken from the built-in role default:

ENABLED_ROLE_PERMISSIONS = {
    'org_default': {
        'big_data_row_limit': -1,
        'big_data_storage_quota': '',
        'can_add_dtable': True,
        'can_add_group': True,
        'can_use_advanced_customization': False,
        'can_use_saml': False,
        'monthly_api_call_limit_per_user': -1,
        'role_asset_quota': '',
        'row_limit': -1,
        'share_limit': 100,
        'snapshot_days': 30
    },
}

can_use_saml only applies to team roles. It allows a team to configure its own SAML identity provider.

Administrator Roles

Similar to a user role, an administrator role is comprised of several permissions, but no quotas.

Administrator permissions default to False

User roles and administrator roles behave in opposite ways when a permission is not set: a user role takes every value that is not explicitly listed from the built-in role default, which grants almost everything; an administrator role grants nothing that is not explicitly listed. Internally, every administrator role is merged onto a hidden role dummy_admin in which all permissions are set to False. Consequently, you must list every single permission that an administrator role shall have.

Administrator Permissions

The following permissions are supported in administrator roles:

Permission Added in version Permission to ... Additional information
can_view_system_info 1.0 See/access "Info" menu in System admin The license cannot be uploaded with this permission alone.
can_view_statistic 1.0 See/access "Statistic" menu in System admin
can_config_system 1.0 See/access "Settings" menu in System admin
can_manage_user 1.0 See/access "Users" menu in System admin
can_update_user 1.6 See and modify the details of an individual user Grants access to a single user account without granting the complete "Users" menu. An administrator with can_manage_user has these rights as well.
can_manage_group 1.0 See/access "Groups" menu in System admin
can_manage_external_link 1.0 See/access "External links" menu in System admin
can_view_audit_log 5.1 See/access "Audit logs" menu in System admin and its tabs "Action logs", "File access logs" and "Permission logs" This permission controls the menu itself. Without it, the menu is hidden — even if can_view_user_log is set. The tabs besides "Login logs" additionally require the user permission can_use_advanced_permissions.
can_view_user_log 1.0 See/access the tabs "Login logs" and "Group member logs" in "Audit logs" menu in System admin Requires can_view_audit_log to make the menu visible.
can_view_admin_log 1.0 See/access "Admin logs" menu in System admin
can_manage_organization 2.0 See/access "Organizations" menu in System admin The menu is only shown if multi-tenancy is enabled.
can_update_organization 2.2 See and modify the details of an individual organization Grants access to a single organization without granting the complete "Organizations" menu. An administrator with can_manage_organization has these rights as well.
can_manage_app 5.3 See/access "Apps" menu in System admin
other_permission 5.2 See/access "Virus scan" menu in System admin Despite its generic name, this permission currently only controls the virus scan records.
can_manage_library 1.0 Administer libraries via the API Inherited from Seafile. SeaTable's system administration has no "Libraries" menu, so this permission only guards the corresponding API endpoints.
can_manage_base 2.0 Administer bases via the API The "Bases" menu is shown to the role default_admin only and cannot be granted to another role. This permission only guards the corresponding API endpoints.
can_manage_form 2.0 Administer forms via the API The "Forms" menu is shown to the role default_admin only and cannot be granted to another role. This permission only guards the corresponding API endpoints.
can_manage_sys_notification 2.0 Administer system notifications via the API The "Notifications" menu is shown to the role default_admin only and cannot be granted to another role. This permission only guards the corresponding API endpoints.
can_manage_plugin 2.0 Administer plugins via the API The "Plugins" menu is shown to the role default_admin only and cannot be granted to another role. This permission only guards the corresponding API endpoints.

The default value for all permissions is False. This means that if a permission is not specifically set, the role does not grant the permission.

Standard Administrator Roles

SeaTable has four standard, preconfigured administrator roles default_admin, system_admin, daily_admin and audit_admin. They can be used in the Users' section of the system administration without prior configuration.

Only an administrator with the role default_admin can assign an administrator role to another administrator. All other administrator roles can see the role of an administrator, but not change it.

The standard administrator roles are defined as follows:

ENABLED_ADMIN_ROLE_PERMISSIONS = {
    # can do everything
    'default_admin': {
        'can_view_system_info': True,
        'can_view_statistic': True,
        'can_config_system': True,
        'can_manage_library': True,
        'can_manage_user': True,
        'can_update_user': True,
        'can_manage_group': True,
        'can_manage_external_link': True,
        'can_view_user_log': True,
        'can_view_audit_log': True,
        'can_view_admin_log': True,
        'can_manage_base': True,
        'can_manage_app': True,
        'can_manage_form': True,
        'can_manage_organization': True,
        'can_update_organization': True,
        'can_manage_sys_notification': True,
        'can_manage_plugin': True,
        'other_permission': True,
    },
    # can ONLY access the "Info" and "Settings" menu
    'system_admin': {
        'can_view_system_info': True,
        'can_config_system': True,
    },
    # can ONLY access the "Info", "Statistic", "Users", "Groups" and "Audit logs" menu
    'daily_admin': {
        'can_view_system_info': True,
        'can_view_statistic': True,
        'can_manage_library': True,
        'can_manage_user': True,
        'can_update_user': True,
        'can_manage_group': True,
        'can_view_user_log': True,
        'can_view_audit_log': True,
    },
    # can ONLY access the "Info", "Audit logs" and "Admin logs" menu
    'audit_admin': {
        'can_view_system_info': True,
        'can_view_admin_log': True,
        'can_view_user_log': True,
        'can_view_audit_log': True,
    }
}

If you want to modify the permissions of one or more standard administrator roles, copy-and-paste the above codeblock into dtable_web_settings.py and modify as per your needs. Restart SeaTable for the changes to take effect.

Custom Administrator Roles

Enterprise Edition

Just like a user role, you can add additional administrator roles by adding/modifying the following codeblock in dtable_web_settings.py.

ENABLED_ADMIN_ROLE_PERMISSIONS = {
    'new_admin_role': {
        'can_view_system_info': True,
        'can_config_system': True,
        'can_manage_user': True,
        'can_manage_group': True,
        'can_view_admin_log': True,
    }
}

Restart SeaTable for the new role to become available in SeaTable.

Custom roles are displayed with their technical name

The four standard administrator roles (and the two standard user roles) have a translated display name in the web interface: default_admin is shown as "Default admin", system_admin as "System admin", daily_admin as "Daily admin" and audit_admin as "Audit admin".

For every other role, SeaTable falls back to the key you defined. A role new_admin_role therefore appears as new_admin_role in the role dropdown of the Users' section — underscores included. If you want a nice-looking entry, choose the key accordingly, e.g. Support instead of support_admin_role.