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
Add support for default role #2631
Conversation
Schema Change Detected. Needs ingestion-core version bump Please run |
387633b
to
ed8715b
Compare
[catalog] Please retry analysis of this Pull-Request directly on SonarCloud. |
cb153e0
to
802f5e4
Compare
802f5e4
to
b69c1f8
Compare
[catalog] Kudos, SonarCloud Quality Gate passed! |
All py tests are failing - need to investigate outside of this PR |
07dd008
to
e7ddebe
Compare
e7ddebe
to
51ebbef
Compare
@@ -0,0 +1,7 @@ | |||
-- Set default as false for all existing roles, to avoid unintended manipulation of roles during migration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this manually with bootstrap migrate-all
|
||
@Override | ||
public void entitySpecificUpdate() throws IOException { | ||
recordChange("default", original.getEntity().getDefault(), updated.getEntity().getDefault()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a minor version change
create = createRequest(test, 2); | ||
createUserAndCheckRoles(create, Arrays.asList(defaultRoleId)); | ||
|
||
// Given a default role has been set, when a user is created with a non default role, then the default role should |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"BDD given, when, then" description for different users being created for this test
This reverts commit bfcd97e.
- Add default field to role - Amend GET /roles to query default roles - Assign default role to new users being created
Describe your changes :
When a new user is created, the default role is assigned to the user automatically by the backend.
Default role can be queried through GET /roles API
There is one more part remaining -- to switch default role from existing one to another.
See #2460 for details
Type of change :
Frontend Preview (Screenshots) :
For frontend related change, please link screenshots of your changes preview! Optional for backend related changes.
Checklist:
Reviewers
Backend: @sureshms @harshach