Licences
Intro
Licensing V2 will focus on what is made available to the organisation, and then allow the organisation to easily choose what their users can access based on the quota from the licence(s) the organisation has.
Then a licence group can be allocated to an organisation to make the licence attributes available to the organisation. An expiry can be set for the licence group which will set whether the licence group is active or inactive.
Licence groups
Licences groups are created in the App management module of the App which is available to admin-level users. When creating a licence group the key details are:
- Licence group name eg: Startup tier
- No. of management seats
- No. of OPTT seats
- Default catalogue modules made available through the licence to the organisation
- Additional catalogues modules made available through the licence to the organisation
- Number of catalogues an organisation can have to assign to management users
- App modules (additional features) made available to the organisation
- Consulting hours made available through the licence to the organisation
Assigning a licence group to an organisation
Once a licence group has been created, it can be assigned to an organisation. The organisation can then assign the licence group attributes to users in the organisation. The organisation can also set an expiry date for the licence group.
The licence groups are allocated to the organisation via the OrganisationLicenceGroup model. The OrganisationLicenceGroup model has an organisation_id and licence_group_id attribute to determine which organisation has been allocated which licence group. It also has an expiry_date attribute to determine when the licence group will expire. And an active attribute to determine if the licence group is active or inactive. Finally there is a quantity attribute to determine how many of the licence group are allocated to the organisation.
Licence tenants
Licence tenants are used to determine which licence groups are available to the organisation in a specific tenant. The licence tenant is set when linking the licence group to the organisation.
Licence group expiry
Licence groups can be given an optional expiry date when allocating to an organisation. Once the expiry date has been reached, the licence group will be set inactive, and will no longer give the organisation access to the attributes.
Licence group attributes
The licence group attribute allocation is handled in separate tables. This allows for the organisation to have multiple licence groups allocated to them at the same time. The organisation can then choose which licence group attributes to assign to which users in the organisation. The attributes accumulated from the licence groups to determine to total quota available to the organisation.
For example: An organisation has one licence group that's active with 10 management seats and another licence group that's active with 5 management seats. The organisation can assign 15 management seats to users in the organisation.
Licence group quantity
When licence groups are allocated to an organisation, the licence administrator can set the quantity of the licence group. The quantity is the number of licence groups that are allocated to the organisation. The quantity can be set to 1 or more.
Assigning licence group attributes to users
Licence group attributes are unique per attribute. The allocation may differ depending on the type of attribute. For example, a management seat is allocated to a user, and the user can then be assigned to a catalogue module. The user can be assigned to multiple catalogue modules, but the user can only be assigned to one management seat.
Attribute tenant scoping
To ensure that the correct licence group attributes are available to the organisation on the correct tenant, all the attribute relationships are scoped to the tenant. This ensures that the organisation can only access the licence group attributes that are available to the organisation on the tenant.
Management seats
Management seats are managed in the organisation_management_seats table. The OrganisationManagementSeat model is used to manage the allocation of management seats to users in the organisation. The OrganisationManagementSeat model has a user_id and organisation_id attribute to determine which user in the organisation has been allocated a management seat.
If an organisation has more management seats allocated than the organisation has users, the organisation can assign the management seats to users as needed. If the organisation has more users than management seats, the organisation can purchase additional management seats.
When a user is assigned a management seat, they will automatically get allocated all default catalogue modules that are available to the organisation through the licence group. The user can then be assigned additional catalogue modules as needed.
OPTT seats
OPTT seats are managed in the organisation_optt_seats table. The OrganisationOpttSeat model is used to manage the allocation of OPTT seats to users in the organisation. The OrganisationOpttSeat model has a user_id and organisation_id attribute to determine which user in the organisation has been allocated an OPTT seat.
If an organisation has more OPTT seats allocated than the organisation has users, the organisation can assign the OPTT seats to users as needed. If the organisation has more users than OPTT seats, the organisation can purchase additional OPTT seats.
Catalogue modules
It is important to note that OrganisationCatalogueModule are only for additional catalogue modules which can be selected by the organisation. The default catalogue modules are automatically assigned to the user when they are assigned a management seat and are not managed in the OrganisationCatalogueModule table.
Organisation catalogue modules are managed in the organisation_catalogue_module table. The OrganisationCatalogueModule model is used to manage the allocation of catalogue modules to the organisation based on the licence group attributes. The OrganisationCatalogueModule model has an organisation_id attribute to determine which organisation has been allocated a catalogue module. And a catalogue_module_id attribute to determine which catalogue module has been allocated to the organisation. There is also an active attribute to determine if the catalogue module is active or inactive depending on the licence group quota.
Catalogue modules users
Catalogue modules are managed in the catalogue_module_organisation_user table. The OrganisationCatalogueModuleUser model is used to manage the allocation of catalogue modules to users in the organisation. The OrganisationCatalogueModuleUser model has an organisation_id and user_id attribute to determine which user in the organisation has been allocated a catalogue module. And a catalogue_module_id attribute to determine which catalogue module has been allocated to the user.
Only management users can be assigned to catalogue modules. And the organisation can only choose catalogue modules that are available in the licence group.
App modules
The licence group attributes determine the app modules available to the organisation based on a custom relationship.
public function app_modules()
{
return OrganisationLicenceGroup::where('organisation_id', $this->organisation_id)
->where('active', true)
->where('expiry_date', '>', Carbon::now())
->with('licence_group.app_modules')
->get()
->pluck('licence_group.app_modules')
->flatten()
->unique();
}
Consulting hours
The licence group attributes determine the consulting hours available to the organisation based on a custom relationship.
public function consulting_hours()
{
return OrganisationLicenceGroup::where('organisation_id', $this->organisation_id)
->where('active', true)
->where('expiry_date', '>', Carbon::now())
->with('licence_group.consulting_hours')
->get()
->pluck('licence_group.consulting_hours')
->flatten()
->unique();
}
When consulting hours are tracked, the organisation will be able to see how many hours have been used and how many hours are remaining. The organisation can then purchase additional consulting hours as needed.