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

Download Permissions: Remove business logic from Application fragments. #2698

Closed
landreev opened this issue Oct 27, 2015 · 1 comment
Closed

Comments

@landreev
Copy link
Contributor

Working on #2648 it became apparent that too much business logic related to download authorization was maintained in different application components. Ideally we want it to be isolated in the PermissionService bean. Below is my comment from Access.java:

TODO: (IMPORTANT!)
Business logic like this should NOT be maintained in individual
application fragments.
At the moment it is duplicated here, and inside the Dataset page.
There are also stubs for file-level permission lookups and caching
inside Gustavo's view-scoped PermissionsWrapper.
All this logic needs to be moved to the PermissionServiceBean where it will be
centrally maintained; with the PermissionsWrapper providing
efficient cached lookups to the pages (that often need to make
repeated lookups on the same files). Care will need to be taken
to preserve the slight differences in logic utilized by the page and
this Access call (the page checks the restriction flag on the
filemetadata, not the datafile - as it needs to reflect the permission
status of the file in the version history).
I will open a 4.[34] ticket.

L.A. 4.2.1

@mheppler
Copy link
Contributor

mheppler commented Aug 6, 2020

Should also consider this issue, Improve Notice (Error) when trying to view a Previous version with non-restricted file #6057, when refactoring business logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants