Class SiteRoleMapping
Class containing mappings of a user's SiteRoles, AdministratorLevels, LicenseLevels and Publishing Capability (boolean).
Inheritance
Namespace: Tableau.Migration.Api.Rest.Models
Assembly: Tableau.Migration.dll
Syntax
public static class SiteRoleMapping
Fields
Collection
Mappings of a user's SiteRoles, AdministratorLevels, LicenseLevels and Publishing Capability (boolean).
| Site Role | Administrator Level | License Level | Publishing Capability |
|---|---|---|---|
| Creator | None | Creator | TRUE |
| Explorer | None | Explorer | FALSE |
| ExplorerCanPublish | None | Explorer | TRUE |
| Guest | None | Viewer | FALSE |
| SiteAdministratorCreator | Site | Creator | TRUE |
| ServerAdministrator | Site | Creator | TRUE |
| SiteAdministratorExplorer | Site | Explorer | TRUE |
| SupportUser | None | Viewer | FALSE |
| Unlicensed | None | Unlicensed | FALSE |
| Viewer | None | Viewer | FALSE |
Declaration
public static readonly List<SiteRoleMappingItem> Collection
Field Value
| Type | Description |
|---|---|
| List<SiteRoleMappingItem> |
Methods
GetAdministratorLevel(string?)
Map a user's SiteRole to a user's administrator level from AdministratorLevels.
Declaration
public static string GetAdministratorLevel(string? siteRole)
Parameters
| Type | Name | Description |
|---|---|---|
| string | siteRole | The siterole of the user. |
Returns
| Type | Description |
|---|---|
| string | Administrator Level from AdministratorLevels. Default is None. |
GetLicenseLevel(string?)
Map a user's SiteRole to a user's license level from LicenseLevels.
Declaration
public static string GetLicenseLevel(string? siteRole)
Parameters
| Type | Name | Description |
|---|---|---|
| string | siteRole |
Returns
| Type | Description |
|---|---|
| string | License Levels from LicenseLevels. Default is Unlicensed. |
GetPublishingCapability(string?)
Map a user's siterole to their publishing capability (boolean).
Declaration
public static bool GetPublishingCapability(string? siteRole)
Parameters
| Type | Name | Description |
|---|---|---|
| string | siteRole | The SiteRole of the user. |
Returns
| Type | Description |
|---|---|
| bool | The Publishing Capability of the user. Default is false. |
GetSiteRole(string, string, bool)
Map input parameter values to a user's SiteRole.
Declaration
public static string GetSiteRole(string adminLevel, string licenseLevel, bool canPublish)
Parameters
| Type | Name | Description |
|---|---|---|
| string | adminLevel | One of the AdministratorLevels of the user. |
| string | licenseLevel | One of the LicenseLevels of the user. |
| bool | canPublish | The Publishing Capability of the user. |
Returns
| Type | Description |
|---|---|
| string | A SiteRole from SiteRoles. |