Skip to content

Add extra admin roles #183

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

Merged
merged 5 commits into from
Feb 26, 2025
Merged

Add extra admin roles #183

merged 5 commits into from
Feb 26, 2025

Conversation

markxnelson
Copy link
Member

@markxnelson markxnelson commented Feb 26, 2025

Allow the use to connect with additional admin roles.

Note that this uses a commit hash in godror, I plan to update this to a release when they do a release with the necessary change in it, and before we do a release with this commit.

Fixes #180

Signed-off-by: Mark Nelson <mark.x.nelson@oracle.com>
Signed-off-by: Mark Nelson <mark.x.nelson@oracle.com>
Signed-off-by: Mark Nelson <mark.x.nelson@oracle.com>
Signed-off-by: Mark Nelson <mark.x.nelson@oracle.com>
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 26, 2025
@markxnelson markxnelson self-assigned this Feb 26, 2025
andytael
andytael previously approved these changes Feb 26, 2025
if strings.ToUpper(e.config.DbRole) == "SYSOPER" {
P.IsSysOper = true
switch strings.ToUpper(e.config.DbRole) {
case "SYSDBA":
Copy link
Member

Choose a reason for hiding this comment

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

This is purely a style recommendation:

  1. Create a new type for this rather than using string literals
  2. switch on the new type

Copy link
Member

Choose a reason for hiding this comment

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

I'd also segregate database role handling code to it's own function/file. gonna suggest database_role.go

Copy link
Member Author

Choose a reason for hiding this comment

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

updated to use the AdminRole type from godror, which handles parsing the string, deals with unknown values correctly, etc.

Signed-off-by: Mark Nelson <mark.x.nelson@oracle.com>
@markxnelson markxnelson merged commit b7a0b7f into main Feb 26, 2025
2 checks passed
@markxnelson markxnelson deleted the 180 branch February 26, 2025 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing roles (SYSDG)
3 participants