How to create a new user license type
- All changes are made in the Utopia solution in the Utopia git repository
- See this PR for the Compliance License for a previously implemented example
C#
- Add a value to the
UserLicenseEnum
enum - Add a value to
AllowedNodeTypesByUserLicenseType
dictionary (if applicable)
- Instantiate a new
UserLicense
in theUserLicenses
static method
- Add a value to the
AccountFeatureEnum
enum - Add a value to the
UserLicenseAccountFeatures
array. The licenses in the UI will display in this order. - Add a value to theĀ
MeteredAccountFeatures
array (assuming that the license will be metered) - Add a value to these other arrays (if applicable)
UserLicenseAssignmentFallbackOrder
RoleLicensesWithConcurrentUserSupport
AdvancedOCRAccountFeatureTypes
MeteredOCRAccountFeatureTypes
UsageFeatureTypes
- Add a resource value for the title of the license
- The name must be
AccountFeatureEnum_{name-of-account-feature-enum}
, e.g.AccountFeatureEnum_ComplianceUserLicense
- The name must be
BusinessLogic\Services\AccountService.cs
- In the
GetAccountReportAsync
method, update the assignment to theuserCountLookup
dictionary to also add the counts of the new license type
BusinessLogic\Services\AccountUsageService.cs
- In the
GetUsageAsync
method, add a line to set the count of the new license
DataAccess\Methods\RoleMethods.cs
- In the
GetUserLicenseCountLookupAsync
method, add a line to set the count of the new license
JavaScript
wwwroot\Client\app\accountFeature\accountFeatureServices.js
- In the
determineFeatureUsageMessage
function, add aswitch case
for the new license
wwwroot\Client\app\auth\authFactories.js
- In the
getUserRoleOnAccount
function, add a block that returns a role for the new license if one exists
wwwroot\Client\app\permission\permissionServices.js
- In the
getPermissionPresets
function, add a block that sets the permission presets of the new license
wwwroot\Client\app\roles\roleServices.js
- In the
isUserLicenseType
function, add the new license to theOR
clause - Add a function called
is{name-of-license-type}UserLicenseType