Org unit prox adjustment tweaks
1) UI change - pre-select highest OU where user can edit
There's a dropdown in the org unit proximity adjustment interface that
affects the scope of what you can see in the table below. Before, that
dropdown would be set to the user's home UO (say, BR1 in the example org
tree). But you might have the permission to make changes everywhere, so
you add a proximity adjustment that affects BR3 in some way. As soon as
you'd refresh the interface, your new proximity adjustment would not be
visible, because your scope selector would default to BR1.
So now the dropdown defaults to the first context where you have the
permission, which in all but eccentric setups should be the highest OU
(and therefore broadest scope) where you have the permission.
This could also improve other interfaces in the future. Anything that
invokes openils.User.buildPermOrgSelector() can pass -1 as the third
parameter to get the new behavior.
2) Change UNIQUE index at DB layer.
This prevents the creation of rows that would give the hold targeter
conflicting directives.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>