]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1480897 - When making a revision public, make the revision editable only by the...
authordklawren <dklawren@users.noreply.github.com>
Mon, 6 Aug 2018 16:26:18 +0000 (12:26 -0400)
committerDylan William Hardison <dylan@hardison.net>
Mon, 6 Aug 2018 16:26:18 +0000 (12:26 -0400)
extensions/PhabBugz/lib/Revision.pm

index 4e82fa500f41734b320bb692a2f679af8a6244bc..d2df62e2783c05f0f56244f47a90e935adfe71c1 100644 (file)
@@ -478,8 +478,14 @@ sub make_private {
 sub make_public {
     my ( $self ) = @_;
 
-    $self->set_policy('view', 'public');
-    $self->set_policy('edit', 'users');
+    my $editbugs = Bugzilla::Extension::PhabBugz::Project->new_from_query(
+        {
+            name => 'bmo-editbugs-team'
+        }
+    );
+
+    $self->set_policy( 'view', 'public' );
+    $self->set_policy( 'edit', ( $editbugs ? $editbugs->phid : 'users' ) );
 
     my @current_group_projects = grep { $_->name =~ /^(bmo-.*|secure-revision)$/ } @{ $self->projects };
     foreach my $project (@current_group_projects) {