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

feat: Add support for BAPI custom permissions endpoints #183

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

mzhong9723
Copy link
Member

Type of change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 🌟 New feature (non-breaking change which adds functionality)
  • 🔨 Breaking change (fix or feature that would cause existing functionality)
  • 📖 Docs change / refactoring / dependency upgrade to change)

Description

Add read, create, update, delete endpoints for custom permission

Related Issue (optional)

@mzhong9723 mzhong9723 requested a review from a team as a code owner November 16, 2023 00:57
@@ -24,3 +25,62 @@ func (s *InstanceService) ListOrganizationPermissions(params ListInstanceOrganiz
}
return response, nil
}

type CreateInstanceOrganizationPermissionParams struct {
Copy link
Member

Choose a reason for hiding this comment

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

🙃 Can't we name this CreateOrganizationPermissionsParams?

Copy link
Member

Choose a reason for hiding this comment

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

What if we introduce the same method on the organization resource/service as well? As those are under the same package, there will be a name conflict

Copy link
Member Author

Choose a reason for hiding this comment

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

What if we introduce the same method on the organization resource/service as well? As those are under the same package, there will be a name conflict

Yes let's keep it with instance in the name, at least for this iteration of the project.

return &orgPermission, nil
}

type UpdateInstanceOrganizationPermissionParams struct {
Copy link
Member

Choose a reason for hiding this comment

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

🙃 Same about the name, UpdateOrganizationPermissionParams.

And since it's the same parameters with Create, would it make sense to have only one type, OrganizationPermissionParams?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is the same fields, except they are optional in the update params. Is there a better way to handle this given that?

Will merge this PR for now, but happy to open a new one to clean it up!

@@ -24,3 +25,62 @@ func (s *InstanceService) ListOrganizationPermissions(params ListInstanceOrganiz
}
return response, nil
}

type CreateInstanceOrganizationPermissionParams struct {
Copy link
Member

Choose a reason for hiding this comment

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

What if we introduce the same method on the organization resource/service as well? As those are under the same package, there will be a name conflict

@mzhong9723 mzhong9723 merged commit e9c37dc into main Nov 16, 2023
@mzhong9723 mzhong9723 deleted the mz/core-672-custom-permissions branch November 16, 2023 21:22
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.

3 participants