[interchange-cvs] interchange - heins modified lib/Vend/UserDB.pm

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Fri Apr 4 20:30:01 2003


User:      heins
Date:      2003-04-05 01:29:39 GMT
Modified:  lib/Vend UserDB.pm
Log:
* Change behavior of UserDB _check_acl routine so that undefined value
  is returned if location is not present at all. This allows a check
  both on the file location and the parent directory location without
  affecting true/false status.

Revision  Changes    Path
2.13      +3 -3      interchange/lib/Vend/UserDB.pm


rev 2.13, prev_rev 2.12
Index: UserDB.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/UserDB.pm,v
retrieving revision 2.12
retrieving revision 2.13
diff -u -r2.12 -r2.13
--- UserDB.pm	4 Apr 2003 04:43:20 -0000	2.12
+++ UserDB.pm	5 Apr 2003 01:29:39 -0000	2.13
@@ -1,6 +1,6 @@
 # Vend::UserDB - Interchange user database functions
 #
-# $Id: UserDB.pm,v 2.12 2003/04/04 04:43:20 mheins Exp $
+# $Id: UserDB.pm,v 2.13 2003/04/05 01:29:39 mheins Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -16,7 +16,7 @@
 
 package Vend::UserDB;
 
-$VERSION = substr(q$Revision: 2.12 $, 10);
+$VERSION = substr(q$Revision: 2.13 $, 10);
 
 use vars qw!
 	$VERSION
@@ -475,7 +475,7 @@
 	$options{mode} = 'r' if ! defined $options{mode};
 	my $acl = $self->{DB}->field( $self->{USERNAME}, $loc);
 	my $f = $ready->reval($acl);
-	return 0 unless exists $f->{$options{location}};
+	return undef unless exists $f->{$options{location}};
 	return 1 if ! $options{mode};
 	if($options{mode} =~ /^\s*expire\b/i) {
 		my $cmp = $f->{$options{location}};