Add the DisableAccount plugin to mediawiki sites
authorTom Hughes <tom@compton.nu>
Tue, 8 Dec 2015 14:28:10 +0000 (14:28 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 8 Dec 2015 14:28:10 +0000 (14:28 +0000)
cookbooks/mediawiki/providers/site.rb
cookbooks/mediawiki/templates/default/mw-ext-DisableAccount.inc.php.erb [new file with mode: 0644]

index 9ee706513e0bc4ec13fd2a629c17feefac367a35..0a72b203d232b1b4b9af18794991de09ef9a959b 100644 (file)
@@ -387,6 +387,12 @@ action :create do
     update_site false
   end
 
+  mediawiki_extension "DisableAccount" do
+    site new_resource.name
+    template "mw-ext-DisableAccount.inc.php.erb"
+    update_site false
+  end
+
   cookbook_file "#{site_directory}/cc-wiki.png" do
     cookbook "mediawiki"
     owner node[:mediawiki][:user]
diff --git a/cookbooks/mediawiki/templates/default/mw-ext-DisableAccount.inc.php.erb b/cookbooks/mediawiki/templates/default/mw-ext-DisableAccount.inc.php.erb
new file mode 100644 (file)
index 0000000..7d0b2f4
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+# DO NOT EDIT - This file is being maintained by Chef
+require_once( $IP.'/extensions/DisableAccount/DisableAccount.php' );
+
+// Allow bureaucrats to disable users
+$wgGroupPermissions['bureaucrat']['disableaccount'] = true;