Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Deprecate UserItem.Roles.UnlicensedWithPublish and .ViewerWithPublish (never accepted by the server)

Aperta
#1,834 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
api

Direzione di ricerca

Start by locating UserItem.Roles and how its class attributes are resolved; compare a class_getattr approach with a Roles.getattribute shim. Review _decompose_site_role and the behavior introduced by PR #1812. Done means accesses to both constants warn, their docstring records historical compatibility and server incompatibility, and existing invalid-user handling remains intact.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

UserItem.Roles.UnlicensedWithPublish and UserItem.Roles.ViewerWithPublish are in the public API but have never worked as site role values against the Tableau server:

  • POST /users (XML path used by users.add): RestApiSiteRole.fromString accepts the modern site roles plus a handful of v2 legacy names (Publisher, Interactor, Guest, SupportUser, SiteAdministrator, ReadOnly). Neither UnlicensedWithPublish nor ViewerWithPublish is in that enum on any REST API version I can see in monolith git history (back to 2023 Perforce snapshot).
  • POST /users/import (CSV path used by users.bulk_add): CsvLicenseRoleTypeConverter accepts only creator/interactor/explorer/viewer/unlicensed/empty; any other value throws USER_CSV_INVALID_LICENSE. There is no site role → license translation before the license converter runs. UnlicensedWithPublish / ViewerWithPublish as literal license column values are rejected outright.

They've been in UserItem.Roles since the first commit of the library (2016-09-02) and have almost certainly been broken since Tableau Server 8.x/9.x-era licensing was replaced with the current Creator/Explorer/Viewer model.

Proposed fix:

  • Emit a DeprecationWarning when either is accessed as a class attribute (via __class_getattr__ on a metaclass, or a Roles.__getattribute__ shim).
  • Update the docstring to note the constants are retained for historical compatibility but do not correspond to any accepted server-side site role.
  • Remove in a future major version.

Alternatively, if there is any historical or planned server behavior that would accept these strings that I have not found, please point at it and this issue can be closed.

Related

  • PR #1812 refactored _decompose_site_role and initially defaulted unmapped site roles to Unlicensed, silently coercing these two roles to a valid-but-wrong user creation. That was changed to emit license="Invalid" (commit ac84fd3) so the server continues to reject the row instead of silently succeeding. This issue is the longer-term followup to properly deprecate the offending constants.
Lingua principale
Python
Stelle
716
Fork
446
Merge medio
8g 8h
PR unite (30g)
2

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tableau/server-client-python

Tutte le issue di tableau/server-client-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.