[ic] Owner field des not work in UI (access_permissions.html)

Stefan Hornburg Racke interchange-users@interchange.redhat.com
Mon Jun 3 13:13:02 2002


René Hertell <rene@hertell.com> writes:

> Hi list,
> 
> Has anyone got the Owner-field option to work in the admin-UI? It does not
> even work on the IC-developer demo.
> 
> If this is a bug in the AdminUI, so what should I add to the access.asc file
> for getting this feature to work?

I fixed the bug in the Admin UI (in CVS).

Ciao
        Racke

2.1.2.3   +15 -6     interchange/dist/lib/UI/pages/admin/access_permissions.html


rev 2.1.2.3, prev_rev 2.1.2.2
Index: access_permissions.html
===================================================================
RCS file: /anon_cvs/repository/interchange/dist/lib/UI/pages/admin/access_permissions.html,v
retrieving revision 2.1.2.2
retrieving revision 2.1.2.3
diff -u -r2.1.2.2 -r2.1.2.3
--- access_permissions.html	22 Feb 2002 16:44:07 -0000	2.1.2.2
+++ access_permissions.html	3 Jun 2002 14:02:26 -0000	2.1.2.3
@@ -18,15 +18,13 @@
 
 [set process_perm]
 [flag type=write table="__UI_ACCESS_TABLE__"]
-[tmp ui_owner][db-hash
+[db-hash
 				table="__UI_ACCESS_TABLE__"
 				column="table_control"
-				key="[cgi user_id]"][/tmp]
-[calc] $Scratch->{ui_owner} .= ";" if $Scratch->{ui_owner} =~ /\S/; return; [/calc]
-<!-- [calc]
-	$tc = [scratch ui_owner] '';
-[/calc] -->
+				key="[cgi user_id]"
+				scratch=ui_owner]
 [perl]
+    $tc = $Scratch->{ui_owner};
 	my @filters = grep /^ui_filter:/, keys %$CGI;
 	foreach my $key (@filters) {
 		my $val = delete $CGI->{$key};
@@ -105,6 +103,11 @@
 </tr>
 
 [seti tables][list-databases][/seti]
+[db-hash
+	table="__UI_ACCESS_TABLE__"
+	column="table_control"
+	key="[cgi user_id]"
+	scratch="ui_owner"]
 [perl tables="__UI_META_TABLE__ __UI_ACCESS_TABLE__"]
 
 	my @permissions = (
@@ -295,6 +298,11 @@
 <td bgcolor=__UI_C_INTBLOCK__ valign=top>[L]Export[/L]</td>
 <td bgcolor=__UI_C_INTBLOCK__ valign=top>[L]Owner field[/L]</td>
 </tr>
+[db-hash
+	table="__UI_ACCESS_TABLE__"
+	column="table_control"
+	key="[cgi user_id]"
+	scratch="ui_owner"]
 
 [perl]
 
@@ -348,6 +356,7 @@
 
 	my $perm;
 	my $title;
+	$tc = $Scratch->{ui_owner};
 	while( $perm = shift @permissions) {
 		$title = shift @permissions;
 		my $ref = $permref->{$perm} || {};



No                   revision



No                   revision



2.0.2.1   +9 -0      interchange/dist/lib/UI/usertag/Attic/db_hash.tag


rev 2.0.2.1, prev_rev 2.0
Index: db_hash.tag
===================================================================
RCS file: /anon_cvs/repository/interchange/dist/lib/UI/usertag/Attic/db_hash.tag,v
retrieving revision 2.0
retrieving revision 2.0.2.1
diff -u -r2.0 -r2.0.2.1
--- db_hash.tag	18 Jul 2001 02:22:15 -0000	2.0
+++ db_hash.tag	3 Jun 2002 14:02:26 -0000	2.0.2.1
@@ -21,6 +21,10 @@
 		}
 	}
 	if (! $rest) {
+		if ($opt->{scratch}) {
+			$::Scratch->{$opt->{scratch}} = $ref;
+			return;
+		}
 		return $val unless defined $opt->{value};
 	}
 	my @extra;
@@ -37,6 +41,11 @@
 			return "BAD HASH: $out" if $opt->{show_error};
 			return;
 		}
+	}
+
+	if ($opt->{scratch}) {
+		$::Scratch->{$opt->{scratch}} = $curr->{$final};
+		return;
 	}
 
 	if($opt->{keys}) {



-- 
Free resources for Interchange programming NOW !!! 
Don't hesitate to contact me if you need my professional help.
Your core developer and consultant for the most sophisticated,
flexible and extensible Open Source eCommerce software.