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

Custom decorators do not work #1381

Open
ArneGudermann opened this issue Jan 23, 2025 · 3 comments · May be fixed by #1394
Open

Custom decorators do not work #1381

ArneGudermann opened this issue Jan 23, 2025 · 3 comments · May be fixed by #1394
Labels
bug(fix) Something isn't working or address a specific issue or vulnerability Priority: High After critical issues are fixed, these should be dealt with before any further issues.

Comments

@ArneGudermann
Copy link
Contributor

Problem:

@foo
@exposed
def bar(key):
...

The foo decorator is never called

@ArneGudermann ArneGudermann added bug(fix) Something isn't working or address a specific issue or vulnerability Priority: High After critical issues are fixed, these should be dealt with before any further issues. labels Jan 23, 2025
@sveneberth
Copy link
Member

sveneberth commented Jan 24, 2025

This problem is the same as #965 and #948 and #935

@ArneGudermann
Copy link
Contributor Author

I think the order of the decorators should also play a role.

@phorward
Copy link
Member

phorward commented Jan 29, 2025

Well, you would have to keep the guards as they are currently implemented as a list with functions that are then processed.

So:

  • @skey must inject a function
  • @access must inject a function
  • @your_custom_decorator must inject a function

So you have to solve this differently in the decorators themselves AND in the method class.

Then you can insert your custom decorators before, and they are being processed in order.

@ArneGudermann ArneGudermann linked a pull request Jan 29, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug(fix) Something isn't working or address a specific issue or vulnerability Priority: High After critical issues are fixed, these should be dealt with before any further issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants