You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CSVImport._evaluate_site_role returns Unlicensed when any role column is empty; the server fills each missing part separately #1937
UserItem.CSVImport._evaluate_site_role returns Unlicensed whenever the license, admin or publisher value is empty. The CSV guidelines allow blank columns, and tabcmd Classic, which sends the file to the server, builds a role from the values that are present, so a row with only some columns can get a different role from TSC.
Example user1,,,viewer (license given, admin and publisher blank):
tabcmd Classic: treats a blank admin value as none and a blank publishing value as no, so the user becomes Viewer. I have not run this live, because it needs a site where the account can manage users; I am reporting how Classic behaves for a row like this, not a measurement.
What the documentation says
The CSV guidelines say "Not all columns need to be filled out, but the required column structure must be preserved by including all the expected comma delimiters", and map (license, admin, publishing) combinations to site roles, for example Viewer is (Viewer, None, False). They do not state what a blank value means.
(tableauserverclient/models/user_item.py, _evaluate_site_role.) This applies on master and in 0.42, and is used by create_user_from_line and create_from_file.
Proposal
Fill each blank part separately instead of returning Unlicensed immediately: a blank license means Unlicensed, a blank publisher means no, a blank admin means none. Then build the role from the three values with the existing rules. If the intended meaning of a blank value is different, the CSV guidelines should say so.
Why it matters
tabcmd 2 has its own copy of the same early return, so it gives Unlicensed where Classic gives Viewer. Fixing TSC lets tabcmd 2 use TSC's function for its CSV import instead of keeping a copy (see #1809).
Activity