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.

This commit is contained in:
ian%hixie.ch 2002-05-06 04:36:42 +00:00
Родитель 99e0b714a0
Коммит 4fe03788dd
3 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

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

Просмотреть файл

@ -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];

Просмотреть файл

@ -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