-
I'm tackling the anvil_extras piece, especially authentication & authorization, And I am having trouble with it. Using the authentication, I could only get it to work by passing in the function name into the decorator; as far as authorizing 🙄 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I have been using this module with great results. As per the docs , you do not need to pass the function name to the decorator, simply decorate the function as per below.
For the
Have you done this? |
Beta Was this translation helpful? Give feedback.
-
There's a relevant discussion on catching server errors in the client at https://anvil.works/forum/t/handling-exception-coming-from-the-server-uplink-modules/1400 TLDR; you need to use Here's an MWE showing how it works: https://anvil.works/build#clone:77KWIM3RW5US2EIM=2CFATCCNWQQT5TNL7PHQADEY |
Beta Was this translation helpful? Give feedback.
I have been using this module with great results.
As per the docs , you do not need to pass the function name to the decorator, simply decorate the function as per below.
For the
@authorisation_required
decorator, you must have followed the instructions below and have the necessary roles and permissions tables set up and linked correctly. Then decorate the function with the appropriate 'role' string (can_edit_sensitive_thing).Have you done this?
Can you provide a clone link …