Closed hugetim closed 2 years ago
The users service isn't enabled by default on an anvil app and I'd prefer our stuff to work by default on any app.
As long as I can pass a require_user
argument to the kompot version of @callable
, it's easy enough to wrap it with my own function to accomplish this effect.
We haven't yet implemented the decorator to support require user. So reopening this
I've recently seen it described as a best practice to require authorization by default, and that seems sensible in my (limited) experience.
So I'd propose having
require_user
default toTrue
. It would then be necessary to explicitly set it toFalse
if you don't want to require authorization. (Or you could still set it to a function to restrict permissions further.)