зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
99e0b714a0
Коммит
4fe03788dd
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче