]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 486881: A powerless user can still see a restricted bug when he removes all his...
authorlpsolit%gmail.com <>
Mon, 6 Apr 2009 20:04:47 +0000 (20:04 +0000)
committerlpsolit%gmail.com <>
Mon, 6 Apr 2009 20:04:47 +0000 (20:04 +0000)
Bugzilla/Bug.pm
Bugzilla/User.pm

index 5038275c86f398e9d83ff382204bb670c50191f8..79cf1dd5e2ff4c619004b9cd1c7e4cb7b68d5ac9 100644 (file)
@@ -876,6 +876,10 @@ sub update {
     delete $self->{'_old_assigned_to'};
     delete $self->{'_old_qa_contact'};
 
+    # Also flush the visible_bugs cache for this bug as the user's
+    # relationship with this bug may have changed.
+    delete Bugzilla->user->{_visible_bugs_cache}->{$self->id};
+
     return $changes;
 }
 
index fe04856aa600aeb477357b9df39309b06835d6a6..603511910e63abc2ebaa209173bb255525dd82d7 100644 (file)
@@ -588,6 +588,8 @@ sub visible_bugs {
 
     # We only check the visibility of bugs that we haven't
     # checked yet.
+    # Bugzilla::Bug->update automatically removes updated bugs
+    # from the cache to force them to be checked again.
     my $visible_cache = $self->{_visible_bugs_cache} ||= {};
     my @check_ids = grep(!exists $visible_cache->{$_}, @bug_ids);