Replies: 3 comments 11 replies
-
Enabled discussions for the repo and converted this issue to a discussion!
I think it makes sense in the case that there are scopes and more features to have control over the files. For example, if you have an "admin" role, you can upload files with unlimited size but an "user" can only upload 10MB. Another example would be you'd have the power to delete files, etc. Just for the sole purpose of sharing tokens with people, I think it could be implemented as an array in the config file. e.g.
Just answered that. 🐻
Let's not use a file dedicated for storing a list of tokens. We have the config file for a reason. I'm okay with that implementation if you decide to go with it! |
Beta Was this translation helpful? Give feedback.
-
Yup, totally an overkill.
I think they can be merged 🐻
Neato, thanks! |
Beta Was this translation helpful? Give feedback.
-
I think we can close this discussion as resolved. |
Beta Was this translation helpful? Give feedback.
-
Sorry for posting an issue, but the discussions are not available for this repo. This is not a bug, but rather a question.
I was thinking whether the possibility of multiple auth tokens is a good idea. My use-case was that I'd like to share access to my rustypaste instance with a few select people. But sharing access tokens is somewhat a no-no, even though it is nothing critical and I know the people I'd give the token to anyway.
What do you think? Is this something that makes sense or is this an overkill?
I thought about a few ways to implement this. e.g. an optional config option
access_token_file
that points to a file, in which each line holds a token. Or anaccess_tokens
array in the config.The question is whether to read that file into an array at start (and when the config is refreshed) or at request time. The latter is easy, but I don't like it due to perf implications, and the former might need a little bit of research on my part (due to memory locking and so on).
It's just an idea for a future feature, but as mentioned I am not sure if it is feasible. It's also not something I have to do myself. A Rustacean can probably do this in 5 minutes or 10 minutes with test cases.
You can close this issue right away. I just didn't find another way to ask this question.
Beta Was this translation helpful? Give feedback.
All reactions