Skip to content

Instantly share code, notes, and snippets.

View dklawren's full-sized avatar

David Lawrence dklawren

View GitHub Profile
diff --git a/Bugzilla/Quantum.pm b/Bugzilla/Quantum.pm
index 03dfcf0d0..d0a1b9df9 100644
--- a/Bugzilla/Quantum.pm
+++ b/Bugzilla/Quantum.pm
@@ -112,6 +112,15 @@ sub startup {
$ses_auth->any('/index.cgi')->to('SES#main');
Bugzilla::Hook::process( 'app_startup', { app => $self } );
+
+ $r->any(
@dklawren
dklawren / gist:33028a37dccae0153f85571bcd12440d
Last active January 13, 2019 23:32
My Boxstarter Script
cinst bitwarden
cinst chocolateygui
cinst ctags
cinst docker-compose
cinst docker-for-windows
cinst duplicati
cinst edgedeflector
cinst em-client
cinst Firefox
cinst git
#Let’s enable extra metadata options by default
[automount]
enabled = true
root = /mnt/
options = "metadata,umask=22,fmask=11"
mountFsTab = false
#Let’s enable DNS – even though these are turned on by default, we’ll specify here just to be explicit.
[network]
generateHosts = true
diff --git a/scripts/remove-non-public-data.pl b/scripts/remove-non-public-data.pl
index ce7948dd0..56abe09cb 100755
--- a/scripts/remove-non-public-data.pl
+++ b/scripts/remove-non-public-data.pl
@@ -140,11 +140,11 @@ my $dbh = Bugzilla->dbh;
print "running sanitizeme.pl\n";
my $sanitizeme = catfile(realpath(dirname(__FILE__)), 'sanitizeme.pl');
-system $sanitizeme, '--execute';
+#system $sanitizeme, '--execute';
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
version: '2'
services:
bmo.test:
build:
context: ../bmo
sub check_user_permission_for_bug {
my ($self, $params) = @_;
my $user = Bugzilla->login(LOGIN_REQUIRED);
# Ensure PhabBugz is on
ThrowUserError('invalid_phabricator_request') unless Bugzilla->params->{phabricator_enabled};
# Validate that the requesting user's email matches phab-bot
ThrowUserError('unauthorized_user') unless $user->login eq PHAB_BMO_USER_EMAIL;
<?php
final class PhabricatorBugzillaConfigOptions
extends PhabricatorApplicationConfigOptions {
public function getName() {
return pht('Bugzilla');
}
public function getDescription() {
@dklawren
dklawren / Phabricator.pm
Created August 2, 2017 16:34
extensions/Push/lib/Connector/Phabricator.pm
diff --git a/extensions/Push/lib/Connector/Phabricator.pm b/extensions/Push/lib/Connector/Phabricator.pm
index 092d63dd3..2d2fd2cb5 100644
--- a/extensions/Push/lib/Connector/Phabricator.pm
+++ b/extensions/Push/lib/Connector/Phabricator.pm
@@ -90,9 +90,10 @@ sub send {
: 'One revision was' )
. ' made private due to unknown Bugzilla groups.';
- my $user =
- Bugzilla->set_user(
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100755
index 0000000..6cfdd57
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,44 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
diff --git a/auth/PhabricatorBMOAuth.css b/auth/PhabricatorBMOAuth.css
index cff2436..1ac99f8 100644
--- a/auth/PhabricatorBMOAuth.css
+++ b/auth/PhabricatorBMOAuth.css
@@ -3,8 +3,8 @@
*/
/* Hide the admin login */
- form[action=/auth/login/password:self/] { display: none; }
- form[action=/auth/login/password:self/].bmo-show { display: block; }