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

Add support for default role (#2631) #2676

Merged
merged 1 commit into from Feb 19, 2022

Conversation

mithmatt
Copy link
Collaborator

@mithmatt mithmatt commented Feb 8, 2022

  • 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 :

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Frontend Preview (Screenshots) :

For frontend related change, please link screenshots of your changes preview! Optional for backend related changes.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my own.
  • I have tagged my reviewers below.
  • I have commented on my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • All new and existing tests passed.

Reviewers

@github-actions
Copy link

github-actions bot commented Feb 8, 2022

Schema Change Detected. Needs ingestion-core version bump

Please run make core_bump_version_dev in the project's root and commit the changes to _version.py in this PR. Please ignore if this has been handled already.

@mithmatt mithmatt force-pushed the default_role branch 2 times, most recently from a33cb34 to 5eff148 Compare February 11, 2022 11:41
@github-actions
Copy link

The Java checkstyle failed.

Please run mvn googleformatter:format@reformat-sources in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions
Copy link

The Java checkstyle failed.

Please run mvn googleformatter:format@reformat-sources in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@mithmatt mithmatt force-pushed the default_role branch 2 times, most recently from 89c447a to 7562983 Compare February 14, 2022 07:57
@mithmatt mithmatt self-assigned this Feb 14, 2022
@mithmatt mithmatt force-pushed the default_role branch 3 times, most recently from ea6596d to 53ba34d Compare February 15, 2022 02:12
@mithmatt
Copy link
Collaborator Author

flaky test from webhook

2022-02-15T03:23:16.0947980Z [INFO] Results:
2022-02-15T03:23:16.0948200Z [INFO] 
2022-02-15T03:23:16.0948406Z [ERROR] Failures: 
2022-02-15T03:23:16.0949336Z [ERROR]   WebhookResourceTest.put_updateEndpointURL:178->EntityResourceTest.deleteEntity:1326->EntityResourceTest.deleteEntity:1336 Expected org.apache.http.client.HttpResponseException to be thrown, but nothing was thrown.
2022-02-15T03:23:16.0949832Z [INFO] 
2022-02-15T03:23:16.0951238Z [ERROR] Tests run: 800, Failures: 1, Errors: 0, Skipped: 0
2022-02-15T03:23:16.0951643Z [INFO] 
2022-02-15T03:23:16.1070018Z [INFO] -------------

@harshach
Copy link
Collaborator

@mithmatt can you rebase this PR we can merge it in

- Add default field to role
- Amend GET /roles to query default roles
- Assign default role to new users being created
@sonarcloud
Copy link

sonarcloud bot commented Feb 19, 2022

[open-metadata-ingestion] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarcloud
Copy link

sonarcloud bot commented Feb 19, 2022

[catalog] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

85.1% 85.1% Coverage
0.0% 0.0% Duplication

@mithmatt mithmatt merged commit f080481 into open-metadata:main Feb 19, 2022
@mithmatt mithmatt deleted the default_role branch February 19, 2022 19:02
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.

None yet

2 participants