4 echo "USAGE: $0 <permission group name>"
14 if [ -z $GROUP_NAME ]; then
18 select perm.code as "Permission",
19 perm.description as "Description",
20 grp.name as "Permission Level",
22 when map.depth = 0 then 'Consortium'
23 when map.depth = 1 then 'System'
24 when map.depth = 2 then 'Branch'
27 when map.grantable = true then 'Grantable'
28 when map.grantable = false then 'Not Grantable'
30 from permission.grp_tree grp
31 join permission.grp_perm_map map on (map.grp = grp.id)
32 join permission.perm_list perm on (map.perm = perm.id)
35 from permission.grp_ancestors(
37 from permission.grp_tree
38 where name = '$GROUP_NAME')
44 PGUSER="$PG_USER" "$PSQL" -A --pset footer --field-separator ',' -o "$GROUP_NAME-perms.out" -c "$SQL" "$PG_DB"