handle -1 from open-ils.actor.user.perm.highest_org
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 May 2007 21:43:17 +0000 (21:43 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 May 2007 21:43:17 +0000 (21:43 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_0@7311 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/main/ws_info.xul

index c9a2e67..61abbd5 100644 (file)
                                'PERM_RETRIEVE_HIGHEST_ORG',
                                [ xulG.auth.session.key, g.user.id(), 'REGISTER_WORKSTATION']
                        );
+                       if (highest_org_id == -1) {
+                               alert('You do not have permission to register a workstation.');
+                               xulG.auth.logoff();
+                               return;
+                       }
                        var perm_depth = findOrgDepth( highest_org_id );
 
                        g.my_libs_tree = g.network.simple_request(