seek
seek copied to clipboard
New Gatekeeper can not view the previous resources, which requested to publish before the gatekeeper was added to the project.
Here is where the project roles are updated. https://github.com/seek4science/seek/blob/f52c963c390ccf165e98ca4fed9b690c223d8cfb/app/controllers/projects_controller.rb#L510-L514
The view right is only granted to gatekeepers when the resource requests to publish https://github.com/seek4science/seek/blob/33a947ea32907af8881bd5e3fd6c39c838f67965/lib/seek/publishing/publishing_common.rb#L246 Therefore for the later aded gatekeeper, it will never trigger the action.
I don't think permission should be granted by the grant_gatekeepers_view_permission
method
Instead we should look at the code that grants permissions based on the role:
https://github.com/seek4science/seek/blob/5311857652d53d21a86b29cfd8990e995e498cc7/lib/seek/permissions/authorization.rb#L79-L81
this code should grant gatekeepers the PUBLISHING
access level, but PUBLISHING
access rights does not allow the user to view:
https://github.com/seek4science/seek/blob/5311857652d53d21a86b29cfd8990e995e498cc7/lib/seek/permissions/authorization.rb#L91-L92
since MANAGING
is 4 and PUBLISHING
is 5
We should look at whether PUBLISHING
rights should allow view
The original issue was solved in this commit. Where permissions are granted to the gatekeeper, and whether they should always be able to see or not was discussed, and it was decided to keep it as is.