Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/discourse/manifests/admin.pp

Issue 6221863587938304: Issue 212 - Update Discourse (Closed)
Patch Set: Created March 27, 2014, 3:37 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/discourse/manifests/admin.pp
===================================================================
deleted file mode 100644
--- a/modules/discourse/manifests/admin.pp
+++ /dev/null
@@ -1,26 +0,0 @@
-define discourse::admin(
- $email = $title,
- $ensure = 'present'
-) {
- # Attempt some escaping
- $escaped_email = regsubst($email, '[\'\\]', '\\\1', 'G')
-
- case $ensure {
- default: {
- err("unknown ensure value ${ensure}")
- }
- present: {
- # Only confirmed accounts should be made admins
- postgresql_psql {"UPDATE users SET admin = true WHERE email = '$escaped_email'":
- db => 'discourse',
- psql_user => 'discourse'
- }
- }
- absent: {
- postgresql_psql {"UPDATE users SET admin = false WHERE email = '$escaped_email'":
- db => 'discourse',
- psql_user => 'discourse'
- }
- }
- }
-}

Powered by Google App Engine
This is Rietveld