Skip to content

[BI-1692] - Change role names#377

Merged
HMS17 merged 15 commits intodevelopfrom
feature/BI-1692
Aug 8, 2024
Merged

[BI-1692] - Change role names#377
HMS17 merged 15 commits intodevelopfrom
feature/BI-1692

Conversation

@HMS17
Copy link
Contributor

@HMS17 HMS17 commented Jul 19, 2024

Description

Story: BI-1692 - Change role names

Added migration to update role domains:

  • admin -> System Administrator
  • breeder -> Program Administrator
  • member -> Read Only

Changed logic to reflect role domain change in the following locations:

  • ProgramSecuredRole enum
  • Logic referencing ProgramSecuredRole
  • Micronaut security that utilizes role in UserController
  • Unit tests and unit test sql scripts

Dependencies

bi-web: feature/BI-1692

Testing

(see bi-web)

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have tested that my code works with both the brapi-java-server and BreedBase
  • I have create/modified unit tests to cover this change
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to documentation
  • I have run TAF: <please include a link to TAF run>

@HMS17 HMS17 requested review from davedrp and nickpalladino August 6, 2024 11:26
@HMS17 HMS17 marked this pull request as ready for review August 6, 2024 11:26
@HMS17 HMS17 requested review from mlm483 and removed request for davedrp August 7, 2024 15:00
@mlm483 mlm483 self-assigned this Aug 7, 2024
Copy link
Contributor

@mlm483 mlm483 left a comment

Choose a reason for hiding this comment

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

Tested, working.

When you merge with develop, you'll notice that your migration version, 1.25.0, fits into an empty slow between the existing 1.24.0 and 1.26.0. In the logs on startup, there's a message that indicates this migration is applied "out of order" (pasted below), and indeed it worked fine. This should only happen on development anyway, the 1.26.0 migrations haven't been applied to production, because they're part of the same release, so there's really no issue. And there's no dependency between the migrations.

Current version of schema "public": 1.26.1
outOfOrder mode is active. Migration of schema "public" may not be reproducible.
Migrating schema "public" to version "1.25.0 - update roles" [out of order]


searchRequest.setFilters(new ArrayList<>());
searchRequest.getFilters().add(new FilterRequest("roles", "breed"));
searchRequest.getFilters().add(new FilterRequest("roles", "Program Administrator"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Any idea why this was "breed" and not "breeder" before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No idea

@HMS17 HMS17 merged commit e037a0c into develop Aug 8, 2024
@HMS17 HMS17 deleted the feature/BI-1692 branch August 8, 2024 13:13
@HMS17 HMS17 restored the feature/BI-1692 branch August 12, 2024 16:32
@HMS17 HMS17 mentioned this pull request Aug 12, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants