diff --git a/tbsetup/os_select.in b/tbsetup/os_select.in index b08ea43a9a6688644b50321bdcf4a8b818bb9ea3..72c6f69aef7b3a54b80ef5b703df59fd117983e2 100644 --- a/tbsetup/os_select.in +++ b/tbsetup/os_select.in @@ -125,10 +125,15 @@ foreach my $node ( @ARGV ) { # Figure out who called us. Only root, people with admin status # in the DB, or members of the right project can do this. # -if ($UID && !TBAdmin($UID) && - !TBNodeAccessCheck($UID, TB_NODEACCESS_MODIFYINFO, @nodes)) { - fatal("os_select: You do not have permission to modify ". - "one or more of the nodes.\n"); +if ($UID && !TBAdmin($UID)) { + if ($list && !TBNodeAccessCheck($UID, TB_NODEACCESS_READINFO, @nodes)) { + fatal("os_select: You do not have permission to access ". + "one or more of the nodes.\n"); + } + if (!$list && !TBNodeAccessCheck($UID, TB_NODEACCESS_MODIFYINFO, @nodes)) { + fatal("os_select: You do not have permission to modify ". + "one or more of the nodes.\n"); + } } #