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: Fixed service path Created March 28, 2014, 8:56 a.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
« no previous file with comments | « modules/discourse/files/sudoers ('k') | modules/discourse/manifests/init.pp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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'
- }
- }
- }
-}
« no previous file with comments | « modules/discourse/files/sudoers ('k') | modules/discourse/manifests/init.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld