-
Notifications
You must be signed in to change notification settings - Fork 74
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
Storage permission endpoint #4316
Conversation
...orage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/StoragePluginModule.scala
Outdated
Show resolved
Hide resolved
delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/AuthDirectives.scala
Outdated
Show resolved
Hide resolved
...src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/permissions/StoragePermissionProvider.scala
Show resolved
Hide resolved
...orage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/StoragePluginModule.scala
Show resolved
Hide resolved
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
Fixes #4264