diff options
Diffstat (limited to 'extensions/PhabBugz/lib')
-rw-r--r-- | extensions/PhabBugz/lib/Feed.pm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/extensions/PhabBugz/lib/Feed.pm b/extensions/PhabBugz/lib/Feed.pm index b58c1ea4b..981c95fb3 100644 --- a/extensions/PhabBugz/lib/Feed.pm +++ b/extensions/PhabBugz/lib/Feed.pm @@ -337,13 +337,20 @@ sub process_revision_change { blessed $revision_phid ? $revision_phid : Bugzilla::Extension::PhabBugz::Revision->new_from_query({ phids => [ $revision_phid ] }); - + + # Project tags/groups that will be used later for policies, etc. my $secure_revision = Bugzilla::Extension::PhabBugz::Project->new_from_query( { name => 'secure-revision' } ); + my $edit_bugs = + Bugzilla::Extension::PhabBugz::Project->new_from_query( + { + name => 'bmo-editbugs-team' + } + ); # NO BUG ID @@ -352,7 +359,7 @@ sub process_revision_change { # If new revision and bug id was omitted, make revision public INFO("No bug associated with new revision. Marking public."); $revision->set_policy('view', 'public'); - $revision->set_policy('edit', 'users'); + $revision->set_policy('edit', ($edit_bugs ? $edit_bugs->phid : 'users')); $revision->remove_project($secure_revision->phid); $revision->update(); INFO("SUCCESS"); @@ -382,7 +389,7 @@ sub process_revision_change { if (!@{ $bug->groups_in }) { INFO('Bug is public so setting view/edit public'); $revision->set_policy('view', 'public'); - $revision->set_policy('edit', 'users'); + $revision->set_policy('edit', ($edit_bugs ? $edit_bugs->phid : 'users')); $revision->remove_project($secure_revision->phid); } # else bug is private. |