-
Notifications
You must be signed in to change notification settings - Fork 49
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
Refactor for_agent
/ clear up API usage
#623
Comments
I'm implementing the new Unfortunately, this broke one of the tests. It turned out that because I set the |
Authorization in
atomic_lib
is done by passing afor_agent
to much of theget_x
type functions. WhenNone
is passed, we don't perform any rights checks. This behavior might be confusing to new users ofatomic_lib
, as they might assume thatNone
means the public agent should be checked.I think we have two options to improve this:
Use one type, improve documentation
Add a
ForAgent
type, and explain carefully how that works (see above).We still have the issue that an
atomic_lib
user might screw up and leak data if they accidentally passNone
while they meanpublic_agent
.Use a URL that represents
sudo
agentSimilar to
urls::PUBLIC_AGENT
, we add aurls::SUDO_AGENT
. Whenever anatomic_lib
user wants to perform some query, they can use this URL.Unfortunately, this seems a lot more verbose and annoying to use.
Create an
enum ForAgent
Is structured, clear... Seems like the way to go!
The text was updated successfully, but these errors were encountered: