Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
donnacoles opened this issue Nov 23, 2022 · 0 comments

Comments

@donnacoles
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant