dadosfera / Bugsfera

Other
1 stars 0 forks source link

Groups that have access to all data assets, are with the access toggle unchecked #54

Closed beatrizaantunes closed 1 year ago

beatrizaantunes commented 1 year ago

Mandatory informations:

There are customers are directly impacted by this bug? Which?

Impact all customers, but none have related this yet

Bug Category

Describe the bug
To Reproduce

Steps to reproduce the behavior:

  1. Go to a data asset
  2. Click on share
  3. See that groups that have access to all data assets (as super admin and data assets manager), are with the access toggle unchecked. image

What environment of software are you using?

beatrizaantunes commented 1 year ago

@Colombo97 can you check this please?

Colombo97 commented 1 year ago

After a frontend debugging I noticed that the /catalog API endpoint is returning an empty array instead a fullfiled one. This property is necessary to render the state of toggle button.

image

@dadosfera/backend Could you check this?

gabrielrra commented 1 year ago

I will take a look right away

gabrielrra commented 1 year ago

Screenshot from 2023-01-09 09-23-01 After sharing the assets with 2 groups, the 2 groups are returned on the GET /catalog API endpoint

Colombo97 commented 1 year ago

Nice! So this isn't exactly an bug but a business rule issue

gabrielrra commented 1 year ago

We have decided to use a strategy using parameters on the GET /roles route to apply the necessary business rule

The query param can be named canUntoggleLogic with value data_assets_sharing for this context. And on the response, along with all other properties, we will return a canUntoggle: boolean on the roles that cannot be untoggled.

Colombo97 commented 1 year ago

Nice, I gonna do the adjustments

gabrielrra commented 1 year ago

It's on STG environment, awaiting validation @beatrizaantunes

beatrizaantunes commented 1 year ago

Validated @gabrielrra @Colombo97 👍🏻