-
Notifications
You must be signed in to change notification settings - Fork 5
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 code to make use of preprocess_priviliges helper function throughout code base #10
Comments
I am not sure whether there would be much more refactoring necessary in the core server, apart from the already introduced line at https://github.com/jic-dtool/dtool-lookup-server/blob/41f800ad48bd184448d5d52328c125eb7bfa828c/dtool_lookup_server/utils.py#L310 The main reason I suggested introducing this tiny helper was that I wanted to build mongo queries in my plugins that adhere to user permissions coherent with the core server's mechanism, i.e. at and |
It looks like there this is complete. However, since you are using this function in your code I think we should make the function public. I would also like to make the function name more explicit. @jotelha how about renaming the function from |
Sure. |
I have implemented this in a backwards compatible way (i.e. the _preprocess_priviliges function is still in the code). I also added tests to the new |
@jotelha - is my understanding correct that we could make more use of the helper function you implemented?
The text was updated successfully, but these errors were encountered: