Rush has submitted this change and it was merged.
Change subject: force the security policy on the transition to 'security-bug'
from any other value.
......................................................................
force the security policy on the transition to 'security-bug' from any other
value.
Change-Id: I29cc643fd1a13e76e7fc86f79b39e5a87ac14a28
---
M src/policy/SecurityPolicyListener.php
1 file changed, 15 insertions(+), 3 deletions(-)
Approvals:
Rush: Verified; Looks good to me, approved
diff --git a/src/policy/SecurityPolicyListener.php
b/src/policy/SecurityPolicyListener.php
index b13dd12..7dcffc2 100644
--- a/src/policy/SecurityPolicyListener.php
+++ b/src/policy/SecurityPolicyListener.php
@@ -41,9 +41,21 @@
if (!$is_new) {
// on pre-existing tasks we simply
// filter out any transactions that would make the task public
- $event->setValue('transactions',
- WMFSecurityPolicy::filter_policy_transactions($transactions));
- return;
+ $transactions =
+ WMFSecurityPolicy::filter_policy_transactions($transactions);
+ $event->setValue('transactions', $transactions);
+
+ $switchToSecurity = false;
+
+ foreach ($transactions as $t) {
+ if ($t->getNewValue() == 'security-bug'
+ && $t->getOldValue() != 'security-bug') {
+ $switchToSecurity = true;
+ }
+ }
+ if (!$switchToSecurity) {
+ return;
+ }
}
if ($security_setting == 'ops-access-request') {
--
To view, visit https://gerrit.wikimedia.org/r/182974
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I29cc643fd1a13e76e7fc86f79b39e5a87ac14a28
Gerrit-PatchSet: 1
Gerrit-Project: phabricator/extensions/security
Gerrit-Branch: master
Gerrit-Owner: 20after4 <[email protected]>
Gerrit-Reviewer: Rush <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits