Fixed a typo in the POD for Session/Env.pm

Added more docs for find method in Group.pm
Fixed a latent bug that would probably never occur in Macro/GroupAdd.pm
If Group->find is called with the name of a group that doesn't exist,
then Group will return an object with defaults, and the guid of the
group is undef, not ''.  However, since by default autoAdd is off,
the Macro will still do the right thing.
GroupDelete has the same bug, but it shouldn't be patched until there's
a test written for it.
This commit is contained in:
Colin Kuskie 2006-07-24 05:08:17 +00:00
parent 0be1193574
commit 5dbd9b44c9
3 changed files with 5 additions and 2 deletions

View file

@ -49,7 +49,7 @@ sub process {
return "" if ($param[1] eq "");
return "" if ($session->user->userId eq '1');
my $g = WebGUI::Group->find($param[0]);
return "" if ($g->getId eq "");
return "" unless defined $g->getId;
return "" unless ($g->autoAdd);
return "" if ($session->user->isInGroup($g->getId));
my %var = ();