зеркало из https://github.com/mozilla/pjs.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:
Родитель
2ea0d3f455
Коммит
b6d076b9ec
|
@ -283,7 +283,7 @@ sub setGroup {
|
||||||
$self->notImplemented();
|
$self->notImplemented();
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getRightForGroups {
|
sub getRightsForGroups {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my($app, @groups) = @_;
|
my($app, @groups) = @_;
|
||||||
$self->notImplemented();
|
$self->notImplemented();
|
||||||
|
|
|
@ -304,10 +304,10 @@ sub setGroup {
|
||||||
return $groupID;
|
return $groupID;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getRightForGroups {
|
sub getRightsForGroups {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my($app, @groups) = @_;
|
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;
|
('?, ' x (@groups-1)) . '?'.')', @groups)->rows;
|
||||||
foreach my $right (@$rights) {
|
foreach my $right (@$rights) {
|
||||||
$right = $right->[0];
|
$right = $right->[0];
|
||||||
|
|
|
@ -350,7 +350,7 @@ sub insertField {
|
||||||
|
|
||||||
sub invalidateRights {
|
sub invalidateRights {
|
||||||
my $self = shift;
|
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
|
$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
|
# don't set a dirty flag, because rights are merely a convenient
|
||||||
# cached expansion of the rights data. Changing this externally
|
# cached expansion of the rights data. Changing this externally
|
||||||
|
|
Загрузка…
Ссылка в новой задаче