summaryrefslogtreecommitdiffstats
path: root/extensions/MozReview/Extension.pm
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/MozReview/Extension.pm')
-rw-r--r--extensions/MozReview/Extension.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/extensions/MozReview/Extension.pm b/extensions/MozReview/Extension.pm
index e523bc2d8..1969ade42 100644
--- a/extensions/MozReview/Extension.pm
+++ b/extensions/MozReview/Extension.pm
@@ -30,6 +30,18 @@ my @METHOD_WHITELIST = (
'Bug.update_attachment',
);
+BEGIN {
+ package Bugzilla::User::APIKey;
+
+ sub is_mozreview {
+ my ($self) = @_;
+ my $mozreview_app_id = Bugzilla->params->{mozreview_app_id};
+ return 0 unless $mozreview_app_id;
+
+ return 1 if $self->app_id && $self->app_id eq $mozreview_app_id;
+ }
+}
+
sub template_before_process {
my ($self, $args) = @_;
my $file = $args->{'file'};