PKP Bugzilla – Bug 6231
Add a user-group selector to all file grids.
Last modified: 2011-03-11 00:10:21 PST
As we no longer have a user group in the session, the user will have to be presented with a user group selector when uploading a file. Probably the choices of user groups in that selector should be limited: 1) To the user groups assigned to the user. 2) To the user groups that make sense in the context of the upload (e.g. reviewers for reviewer file upload, authors/press managers/series editors for submission file upload in the submission process, etc.) When there is only one user-group that fullfills these filter criteria then we don't need a selector but can set the user group by default. When there are several user groups available then we could select a gould default like this: 1) If we are in a workflow page context we could set the (first) user group assigned to the user for the current workflow step as a default. 2) Otherwise we could set the user group with the lowest row id as a default (e.g. press manager role overrides author role, etc.) 3) Only if these heuristics do not provide a good default could we choose the first user group in the list. I propose that we order user groups alphabetically in the drop down. A similar logic will have to be implemented for event logging, see
Once this is done, add a $userGroup parameter to the handle*Upload() methods of the MonographFileManager and replace the "acting-as" code there.
I added temporary code to the MonographFileManager until this bug is fixed, see FIXME with this bug number there, see https://github.com/pkp/omp/commit/4102801c0d5b3e62f02d30f4a3ef9a60660b0b0f
@Juan: This is the bug report where I described the heuristics how I'd specify the uploader's user group. I implement this now. I think you agreed on that logic, right? Samm corrections of the heuristics in the bug description: - The limitation of the user group choice in the selector (see "users that make sense in the context of the upload" above) can be based on the user roles from the policy. - I wrote "the user group with the lowest row id" above, this should be "role id"
s/Samm/Small/
Fixed, see: https://github.com/pkp/pkp-lib/commit/85731a33a86b5d3a047e3b9c95d354e555a63374 https://github.com/pkp/omp/commit/e2af02384eac76f13de94ed433d7c5e473471ca1