[interchange-cvs] interchange - heins modified dist/lib/UI/usertag/list_databases.tag

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Sat Oct 6 02:47:00 2001


User:      heins
Date:      2001-10-06 06:46:06 GMT
Modified:  dist/lib/UI/usertag list_databases.tag
Log:
	* Fix super-user problem with yes_tables/no_tables setting.

Revision  Changes    Path
2.1       +20 -16    interchange/dist/lib/UI/usertag/list_databases.tag


rev 2.1, prev_rev 2.0
Index: list_databases.tag
===================================================================
RCS file: /anon_cvs/repository/interchange/dist/lib/UI/usertag/list_databases.tag,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -r2.0 -r2.1
--- list_databases.tag	2001/07/18 02:22:15	2.0
+++ list_databases.tag	2001/10/06 06:46:06	2.1
@@ -8,26 +8,30 @@
 	my @dbs;
 	my $d = $Vend::Cfg->{Database};
 	@dbs = sort keys %$d;
-	my @outdb;
-	my $record =  ui_acl_enabled();
-	undef $record
-		unless ref($record)
-			   and $record->{yes_tables} || $record->{no_tables};
 
-	for(@dbs) {
-		next if $::Values->{ui_tables_to_hide} =~ /\b$_\b/;
-		if($record) {
-			next if $record->{no_tables}
-				and ui_check_acl($_, $record->{no_tables});
-			my $check = "$_$extended";
-			next if $record->{yes_tables}
-				and ! ui_check_acl($check, $record->{yes_tables});
+	GENDBLIST: {
+		last GENDBLIST if $nohide;
+		my @outdb;
+		my $record =  ui_acl_enabled();
+		last GENDBLIST if $record and $record->{super};
+		undef $record
+			unless ref($record)
+				   and $record->{yes_tables} || $record->{no_tables};
+
+		for(@dbs) {
+			if($record) {
+				next if $record->{no_tables}
+					and ui_check_acl($_, $record->{no_tables});
+				my $check = "$_$extended";
+				next if $record->{yes_tables}
+					and ! ui_check_acl($check, $record->{yes_tables});
+			}
+			push @outdb, $_;
 		}
-		push @outdb, $_;
+
+		@dbs = $nohide ? (@dbs) : (@outdb);
 	}
 
-	@dbs = $nohide ? (@dbs) : (@outdb);
-	
 	my $string = join " ", grep /\S/, @dbs;
 	return $string;
 }