Skip to content

[17.0][ADD] apikey_scope_editable#807

Merged
OCA-git-bot merged 1 commit intoOCA:17.0from
sygel-technology:17.0-add-apikey_scope_editable
Aug 21, 2025
Merged

[17.0][ADD] apikey_scope_editable#807
OCA-git-bot merged 1 commit intoOCA:17.0from
sygel-technology:17.0-add-apikey_scope_editable

Conversation

@Tisho99
Copy link
Copy Markdown
Contributor

@Tisho99 Tisho99 commented Jun 16, 2025

This module allows you to set an API Key scope on its creation, a field used by odoo to filter the used api keys

T-8323

Copy link
Copy Markdown

@ValentinVinagre ValentinVinagre left a comment

Choose a reason for hiding this comment

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

Functionally tested and everything is correct. Minor changes are needed and tests

Comment thread apikey_scope_editable/views/model_name_view.xml Outdated
Comment thread apikey_scope_editable/__manifest__.py Outdated
Comment thread apikey_scope_editable/wizards/res_users_apikeys_description.py Outdated
@Tisho99 Tisho99 force-pushed the 17.0-add-apikey_scope_editable branch from c0ca572 to fb28d7a Compare June 18, 2025 08:52
@Tisho99 Tisho99 marked this pull request as ready for review June 18, 2025 08:58
Copy link
Copy Markdown

@ValentinVinagre ValentinVinagre left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏻

@ValentinVinagre
Copy link
Copy Markdown

@pedrobaeza pedrobaeza added this to the 17.0 milestone Aug 20, 2025
class APIKeyDescription(models.TransientModel):
_inherit = "res.users.apikeys.description"

scope = fields.Char()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't this be a selection to avoid errors, or at least to have a hint about what to fill?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi Pedro, thanks for the review.

I'd rather give a hint: the original scope field to which this propagates is a char and can have any value. I'll try to improve the module's documentation to make it easier to understand.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi @pedrobaeza

Upon closer inspection, I think what you said about changing it to a selection seems fine. I've made the change to offer a selection of values, added the option to enter free text, and modified the description a bit.

Does it seem better to you?

@Tisho99 Tisho99 force-pushed the 17.0-add-apikey_scope_editable branch from fb28d7a to 92b0b7e Compare August 20, 2025 16:06
Copy link
Copy Markdown
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 17.0-ocabot-merge-pr-807-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit e0e7931 into OCA:17.0 Aug 21, 2025
5 of 7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 4a54e5d. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants