Skip to content

Error with add_default_permissions when RunExplainData or CreateRefreshMetrics included in capabilities  #105

@donnacoles

Description

@donnacoles

If I have a string of capabilities I want to add to the default project permissions for workbooks then this code snippet works

str2={'Read': 'Allow',
'Filter': 'Allow',
'ExportImage': 'Allow',
'ShareView': 'Allow',
'ViewUnderlyingData': 'Allow',
'WebAuthoring': 'Allow',
'Write': 'Allow',
'ExportXml': 'Allow',
'ExportData': 'Allow'
}

response=conn.add_default_permissions(
project_id='6161a87d-516a-4f91-ab83-5f57e4468b63',
group_id='622a76fe-2373-46ff-956e-72dfbe330bb0',
project_permissions_object='workbooks',
group_capability_dict=str2
)

but as soon as I add either RunExplainData or CreateRefreshMetrics to the list, so my string is like

str2={'Read': 'Allow',
'Filter': 'Allow',
'ExportImage': 'Allow',
'ShareView': 'Allow',
'ViewUnderlyingData': 'Allow',
'WebAuthoring': 'Allow',
'Write': 'Allow',
'ExportXml': 'Allow',
'ExportData': 'Allow',
'RunExplainData': 'Allow'
}

the code errors with and InvalidParameterException error
AddDefaultPermissionsRequest received an invalid combination of parameters.
Evaluate the parameters below and correct accordingly:
{'_connection': <tableau_api_lib.tableau_server_connection.TableauServerConnection object at 0x000002A1EE5DEC20>, '_request_body': {}, '_user_id': None, '_group_id': '622a76fe-2373-46ff-956e-72dfbe330bb0', '_user_capability_dict': None, '_group_capability_dict': {'Read': 'Allow', 'Filter': 'Allow', 'ExportImage': 'Allow', 'ShareView': 'Allow', 'ViewUnderlyingData': 'Allow', 'WebAuthoring': 'Allow', 'Write': 'Allow', 'ExportXml': 'Allow', 'ExportData': 'Allow', 'RunExplainData': 'Allow'}, '_user_capability_names': None, '_user_capability_modes': None, '_group_capability_names': None, '_group_capability_modes': None}

I have used the REST API directly to apply default permission with the same set of capabilities on the same server (v 2022.1) with no issue.

Can this please be looked at.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions