Skip to content
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

Storage permission endpoint #4316

Merged

Conversation

shinyhappydan
Copy link
Contributor

@shinyhappydan shinyhappydan commented Sep 29, 2023

Fixes #4264

Copy link
Contributor

@dantb dantb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

import ch.epfl.bluebrain.nexus.delta.sourcing.model.ProjectRef
import monix.bio.UIO

class StoragePermissionProviderImpl(storages: Storages) extends StoragePermissionProvider {
Copy link
Contributor

@dantb dantb Sep 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate this is just following the existing pattern but was wondering about the XxxImpl thing all over the codebase - are there any downsides to sticking them in the companion objects and having anonymous instances? I understand the separation was an old pattern but they always seem to be in the same module anyway so it sort of just adds bloat to the codebase with no upside AFAICT (new file, all the imports again, new-ing things up etc)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main issue here is that the implementation needs to be in a different module to the trait. Usually I would have written it in the way you describe

@shinyhappydan shinyhappydan merged commit eb9fde2 into BlueBrain:master Sep 30, 2023
5 checks passed
@shinyhappydan shinyhappydan deleted the storage-permission-endpoint branch September 30, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an endpoint to check if the user has read/write access for files on a particular storage
3 participants