Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(4032) - 4156 - Refactor Atlantis countries usage #4163

Conversation

sorja
Copy link
Contributor

@sorja sorja commented Nov 29, 2024

Resolves #4156

  • test

@sorja sorja requested a review from minotogna November 29, 2024 11:16
@sorja sorja self-assigned this Nov 29, 2024
@sorja sorja linked an issue Nov 29, 2024 that may be closed by this pull request
where (ur.cycle_uuid = '${cycle.uuid}' and
ur.assessment_uuid = '${assessment.uuid}')
or ur.role = 'ADMINISTRATOR'
where (
Copy link
Contributor Author

@sorja sorja Nov 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update country user summaries to exclude atlantis roles for published cycles to avoid mismatch in logic
(E.g. FRA2020 -> Admin -> Collaborators: show atlantis country role for user, go to edit user as admin, the role is not visible because we don't allow atlantis countries in published cycles)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't want Atlantis to show up only in public view .
Users with roles should


import { fields } from './fields'

const selectFields = fields.map((f) => `u.${f}`).join(',')

const userRolesSubquery = `
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue mentions

line 65: get rid of usersRoleSubquery

But I think it is required if we want to exclude Atlantis roles in published cycles

Let me know

@sorja sorja changed the title 4032 4156 refactor atlantis countries usage (4032) - 4156 - Refactor Atlantis countries usage Nov 29, 2024
@sorja
Copy link
Contributor Author

sorja commented Nov 29, 2024

  • keep atlantis alive
  • hide when public view (not logged in) from getManyCountris

@sorja sorja marked this pull request as draft November 29, 2024 14:00
@minotogna
Copy link
Member

@sorja this PR can be merged into 4032 branch if it's ready. what do you think ?

@sorja
Copy link
Contributor Author

sorja commented Dec 9, 2024

@sorja this PR can be merged into 4032 branch if it's ready. what do you think ?

🛠️ still working on this

Need to update the logic, this is the placeholder PR only:

  • only hide Atlantis countries if user is not logged in and cycle is published
  • Changes should mostly (only?) affect getMany countries

@sorja sorja closed this Dec 13, 2024
@sorja sorja deleted the 4032-4156-refactor-atlantis-countries-usage branch December 13, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Atlantis countries usage
2 participants