appuio / cloud-portal

APPUiO Cloud Portal (Web Frontend)
Apache License 2.0
5 stars 0 forks source link

Frontend support for BillingEntity #438

Closed corvus-ch closed 1 year ago

corvus-ch commented 1 year ago

Summary

As "a user"\ I want "to link Organizations to BillingEntities"\ So that "I can control where invoices get sent to"

Context

We have introduced a new resource: BillingEntity. Cloud Portal users must be able to view this billing entity.

Out of Scope

Further links

Acceptance Criteria

Scenario: List billing entities
  When I visit "/billingentities"
  Then I see a list of BillingEntities
  And the list displays `spec.name` labeled as "Entity Name"
  And the list displays `spec.accountingContact.name` labeled as "Contact Name" if set

Scenario: View billing entity
  When I visit "/billingentities/<id>"
  Then I see a detail view of a BillingEntity
  And all the entities fields are presented (please make a suggestion)

Scenario: List organizations
  When I visit "/organizations"
  Then I see `status.billingEntityName` labeled as  "Billing Entity"
  And the value of "Billing Entity" is linked to `/billingentities/<spec.billingEntityRef`
  And the link to edit Organizations is only active when I have permissions to view BillingEntities.

Scenario Outline: Link to BillingEntity
  Given an Organization
  And that Organization is linked to a BillingEntity
  And I <access> access to that BillingEntity
  When I view that Organization
  Then the "Billing Entity" value is a <link>

  Examples:
    | access  | link                                              |
    | have    | link to `/billingentities/<spec.billingEntityRef` |
    | have no | plain text                                        |

Scenario: Gracefull degradation
  Given an Organization
  And that Organization is linked to a BillingEntity
  And the BillingEntity API is unavailable
  When I view that Organization in a list or edit view
  Then I do not notice the degradation

Scenario: Create Organization
  Given I have permissions to create Organizations
  And I have permissions to view BillingEntities
  When I create a new Organization
  Then there is a mandatory drop down where I must select a BillingEntity

Scenario: Edit Organization
  Given I have permissions to edit Organizations
  And I have permissions to view BillingEntities
  When I edit an Organization
  Then I can change the BillingEntity

Implementation Ideas

No response

ccremer commented 1 year ago

@corvus-ch Given that creation and editing Organizations now also require list permissions for billing entities, is there anything to change in the first-login-dialog? Or is it save to assume that a new user will have the required access permissions?

image

corvus-ch commented 1 year ago

[…] is there anything to change in the first-login-dialog? […]

Good catch. So the idea for now is, that users will end up on the platform though an invitation. An invitation will give them access to an organization (which prevents this dialog from showing up) or to a Billing Entity (which this dialog still applies). While it is technically possible to end up on the platform without an invitation (where this dialog then would be wrong), I would argue we can safely ignore that for now. It will not take long until we implement write/create for Billing Entities (issue to come).

ccremer commented 1 year ago

I think this is now implemented with #493 . Is there anything left for this? Feel free to close otherwise

corvus-ch commented 1 year ago

We are missing an important thing: editing the permissions of a BillingEntity. Analogous to how Organizations work ( #149), a BillingEntity admin, must be enabled to edit admin and viewer permissions on BillingEntities. Where is this better placed, here or as part of #460?

ccremer commented 1 year ago

Since this is independent of invitations, I'd say either here, or a new issue following this one.

ccremer commented 1 year ago

@corvus-ch I think we can close this?