Fixing the spelling of getRightsForGroups() where it is declared and used. Also fixing one of the SQL statements to use rights.rightID not rights.ID.

git-svn-id: svn://10.0.0.236/trunk@120813 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ian%hixie.ch
2002-05-06 04:36:42 +00:00
parent 1458ab2d6a
commit b54f6a7738
3 changed files with 4 additions and 4 deletions

View File

@@ -283,7 +283,7 @@ sub setGroup {
$self->notImplemented();
}
sub getRightForGroups {
sub getRightsForGroups {
my $self = shift;
my($app, @groups) = @_;
$self->notImplemented();

View File

@@ -304,10 +304,10 @@ sub setGroup {
return $groupID;
}
sub getRightForGroups {
sub getRightsForGroups {
my $self = shift;
my($app, @groups) = @_;
my $rights = $self->database($app)->execute('SELECT rights.name FROM rights, groupRightsMapping WHERE groupRightsMapping.rightID = rights.ID AND groupRightsMapping.groupID IN(' .
my $rights = $self->database($app)->execute('SELECT rights.name FROM rights, groupRightsMapping WHERE groupRightsMapping.rightID = rights.rightID AND groupRightsMapping.groupID IN(' .
('?, ' x (@groups-1)) . '?'.')', @groups)->rows;
foreach my $right (@$rights) {
$right = $right->[0];

View File

@@ -350,7 +350,7 @@ sub insertField {
sub invalidateRights {
my $self = shift;
my $rights = $self->app->getService('dataSource.user')->getRightsForGroup($self->app, keys(%{$self->{'groupsByID'}}));
my $rights = $self->app->getService('dataSource.user')->getRightsForGroups($self->app, keys(%{$self->{'groupsByID'}}));
$self->rights({ map {$_ => 1} @$rights }); # map a list of strings into a hash for easy access
# don't set a dirty flag, because rights are merely a convenient
# cached expansion of the rights data. Changing this externally