From c7fd0908bd85bc5761aa28fe9c893f93394bfd4b Mon Sep 17 00:00:00 2001 From: Piotr Zalewa Date: Wed, 28 Feb 2018 23:13:43 +0100 Subject: Bug 1440239 - PhabBugz - Assign a secure-revision --- extensions/PhabBugz/lib/Feed.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'extensions/PhabBugz/lib/Feed.pm') diff --git a/extensions/PhabBugz/lib/Feed.pm b/extensions/PhabBugz/lib/Feed.pm index c7d6d0a29..3b158d2d6 100644 --- a/extensions/PhabBugz/lib/Feed.pm +++ b/extensions/PhabBugz/lib/Feed.pm @@ -23,11 +23,11 @@ use Bugzilla::Extension::PhabBugz::Revision; use Bugzilla::Extension::PhabBugz::User; use Bugzilla::Extension::PhabBugz::Util qw( add_security_sync_comments - create_private_revision_policy create_revision_attachment edit_revision_policy get_bug_role_phids get_phab_bmo_ids + get_project_phid get_security_sync_groups is_attachment_phab_revision make_revision_public @@ -183,6 +183,8 @@ sub process_revision_change { $self->logger->debug('Bug is public so setting view/edit public'); $revision->set_policy('view', 'public'); $revision->set_policy('edit', 'users'); + my $secure_project_phid = get_project_phid('secure-revision'); + $revision->remove_project($secure_project_phid); } # else bug is private. else { @@ -225,6 +227,9 @@ sub process_revision_change { $revision->set_policy('edit', $new_policy->phid); } + my $secure_project_phid = get_project_phid('secure-revision'); + $revision->add_project($secure_project_phid); + my $subscribers = get_bug_role_phids($bug); $revision->set_subscribers($subscribers); } -- cgit v1.2.3-24-g4f1b