[OPEN-ILS-DEV] User permissions error
Dan Scott
denials at gmail.com
Wed May 28 09:45:01 EDT 2008
Hi Robert:
2008/5/28 Robert <glibrarysystem at gmail.com>:
> Here is the first output:
>
> evergreen=# select id, parent_ou, ou_type, shortname from actor.org_unit;
> id | parent_ou | ou_type | shortname
> ----+-----------+---------+-----------
> 1 | | 1 | CONS
> 2 | 1 | 2 | SYS1
> 8 | 4 | 3 | BKM
> 10 | 2 | 2 | XB
> 11 | 2 | 2 | XFI
> 12 | 2 | 2 | XG
> 13 | 2 | 2 | XM
> 14 | 2 | 2 | XP
> 15 | 2 | 2 | XS
> 16 | 2 | 2 | XT
> 17 | 2 | 2 | XTR
> 18 | 2 | 2 | XW
> 5 | 2 | 2 | XA
> 4 | 2 | 2 | MAIN
> (14 rows)
This is a problem.
The children of node ID 2 (SYS1) have the same ou_type as their parent
(ou_type = 2). But the ou_type is a pointer to the actor.org_unit_type
table, and each of the entries in the actor.org_unit_type table has a
specific depth in the hierarchy. So actor.org_unit.id 2 (SYS1) with an
ou_type of 2 has an actor.org_unit_type.depth of 1, and
actor.org_unit.id 10 (XB) with an ou_type of 2 also has an
actor.org_unit_type.depth of 1, even though as a child of SYS1 it is
at depth 2 in the hierarchy.
If your actor.org_unit_type table is still the same as was delivered
at install time, you probably want to update all rows in
actor.org_unit that are children of node 2 to have an ou_type of 3.
You could issue the following statement via psql:
UPDATE actor.org_unit SET ou_type = 3 WHERE parent_ou = 2;
Another problem is that the actor.org_unit.id 8 (BKM) entry has a
parent_ou value of 4, even though there is no entry in the
actor.org_unit table with an id of 4. You probably want to simply
delete that entry:
DELETE FROM actor.org_unit WHERE id = 8;
--
Dan Scott
Laurentian University
More information about the Open-ils-dev
mailing list