- Partner model additions

- menu changes to allow for partners
- partner views and forms now in partner_forms.py and partner_views.py
- Introduction of services layer
- Allow all configuration to handle partner configurations, and adaptation of caching to allow for this
This commit is contained in:
Josako
2025-05-02 13:10:59 +02:00
parent 9652d0bff9
commit 6ef025363d
72 changed files with 1342 additions and 228 deletions

View File

@@ -10,10 +10,19 @@
{{ render_selectable_table(headers=["ID", "Name", "Version", "Start Date", "End Date"], rows=rows, selectable=True, id="licenseTierTable") }}
<div class="form-group mt-3 d-flex justify-content-between">
<div>
<button type="submit" name="action" value="edit_license_tier" class="btn btn-primary" onclick="return validateTableSelection('licenseTiersForm')">Edit License Tier</button>
<button type="submit" name="action" value="create_license_for_tenant" class="btn btn-secondary" onclick="return validateTableSelection('licenseTiersForm')">Create License for Current Tenant</button>
{% if current_user.has_role('Super User') %}
<button type="submit" name="action" value="edit_license_tier" class="btn btn-primary" onclick="return validateTableSelection('licenseTiersForm')">Edit License Tier</button>
{% endif %}
{% if current_user.has_role('Super User') or (current_user.has_role('Partner Admin') and can_assign_license) %}
<button type="submit" name="action" value="create_license_for_tenant" class="btn btn-secondary" onclick="return validateTableSelection('licenseTiersForm')">Create Tenant License</button>
{% endif %}
{% if current_user.has_role('Super User') %}
<button type="submit" name="action" value="associate_license_tier_to_partner" class="btn btn-secondary" onclick="return validateTableSelection('licenseTiersForm')">Associate to Partner</button>
{% endif %}
</div>
<button type="submit" name="action" value="create_license_tier" class="btn btn-success">Register License Tier</button>
{% if current_user.has_role('Super User') %}
<button type="submit" name="action" value="create_license_tier" class="btn btn-success">Register License Tier</button>
{% endif %}
</div>
</form>