Bug 6231 - Add a user-group selector to all file grids.
Add a user-group selector to all file grids.
Status: RESOLVED FIXED
Product: OMP
Classification: Unclassified
Component: General
1.0
PC Linux
: P3 normal
Assigned To: PKP Support
Depends on:
Blocks: 6125
  Show dependency treegraph
 
Reported: 2010-11-21 14:33 PST by jerico
Modified: 2011-03-11 00:10 PST (History)
1 user (show)

See Also:
Version Reported In:
Also Affects:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jerico 2010-11-21 14:33:57 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
Comment 1 jerico 2010-11-21 23:05:07 PST
Once this is done, add a $userGroup parameter to the handle*Upload() methods of the MonographFileManager and replace the "acting-as" code there.
Comment 2 jerico 2010-11-26 09:15:21 PST
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
Comment 3 jerico 2011-03-10 17:06:03 PST
@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"
Comment 4 jerico 2011-03-10 17:06:25 PST
s/Samm/Small/