Role must be in ['default', 'guest', 'org_default', 'Custom-user']

On self-hosted, trying to add some custom roles as described by the manual in the dtable_web_settings.py. The new role is visible when I click the role selection of “Custom-user” in the system admin, but I receive an error “role must be in [‘default’, ‘guest’, ‘org_default’, ‘Custom-user’]”. The default, guest and org_default roles work fine. Any idea how to troubleshoot? This is what I have in dtable_web_settings.py:

ENABLED_ROLE_PERMISSIONS = {
    'default': {
        'can_add_dtable': True,
        'can_add_group': True,
        'can_use_global_address_book': True,
        'can_invite_guest': False,
        'role_quota': '',
        'role_asset_quota': '',
        'row_limit': -1,
        'can_create_common_dataset': True,
        'can_generate_external_link': True,
        'can_run_python_script': True,
        'can_schedule_run_script': True,
        'scripts_running_limit': -1,
        'can_use_advanced_permissions': True,
        'can_use_advanced_customization': True,
        'can_use_external_app': True,
        'can_use_automation_rules': True,
        'snapshot_days': 180,
        'share_limit': 100,
        'can_archive_rows': True,
        'big_data_row_limit': -1
    },
    'Custom-user': {
        'can_add_dtable': False,
        'can_add_group': False,
        'can_use_global_address_book': True,
        'can_invite_guest': False,
        'role_quota': '',
        'role_asset_quota': '',
        'row_limit': -1,
        'can_create_common_dataset': True,
        'can_generate_external_link': False,
        'can_run_python_script': True,
        'can_schedule_run_script': True,
        'scripts_running_limit': -1,
        'can_use_advanced_permissions': False,
        'can_use_advanced_customization': False,
        'can_use_external_app': True,
        'can_use_automation_rules': True,
        'snapshot_days': 180,
        'share_limit': 100,
        'can_archive_rows': True,
        'big_data_row_limit': -1
    },
    'guest': {
        'can_add_dtable': False,
        'can_add_group': False,
        'can_use_global_address_book': False,
        'can_invite_guest': False,
        'role_quota': '',
        'role_asset_quota': '',
        'row_limit': -1,
        'can_create_common_dataset': False,
        'can_generate_external_link': False,
        'can_run_python_script': False,
        'can_schedule_run_script': False,
        'scripts_running_limit': -1,
        'can_use_advanced_permissions': False,
        'can_use_advanced_customization': False,
        'can_use_external_app': False,
        'can_use_automation_rules': False,
        'snapshot_days': 30,
        'share_limit': 100,
        'can_archive_rows': False
    },
}

The role name “Custom-role” is not supported. When using lower case words (i.e. “custom-role”), you won’t have a problem.

We’ll check if we can improve that.

Perfect, the capital letter was the cause of the problem! Thanks.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.