chiark / gitweb /
email tokens, fixes
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 5 Dec 2020 17:02:43 +0000 (17:02 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 5 Dec 2020 17:02:43 +0000 (17:02 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
nwtemplates/token-other.tera
nwtemplates/token-unix.tera
src/cmdlistener.rs

index e58c2411fa2de6d02c6d4143881a533314fbd881..62be7c04049fea6879c79223cd0ee372aec06162 100644 (file)
@@ -7,8 +7,8 @@ has invited you to join the game
   {{ game_name }}
 
 You can play, directly, by visiting this link in a suitable browser.
-{% for l in token_lines %}
-{{ l }}
+{%- for l in token_lines %}
+  {{ l }}
 {%- endfor %}
 
 They have set for you the nickname, within the game, of
index dccebe3ffc7c5a981ddac327e2e93cc7c231d056..103fe1d05cb5c97d7d490deaf651fca8a88cae10 100644 (file)
@@ -1,4 +1,4 @@
-From: Otter game server on behalf of <{{ unix_user }}}>
+From: Otter game server on behalf of <{{ unix_user }}>
 To: {{ player_email }}
 Subject: Game access link {{ game_name }}
 
@@ -7,8 +7,8 @@ Hi.  I'm inviting you to join the game
 on this Otter server.
 
 You can play, directly, by visiting this link in a suitable browser.
-{% for l in token_lines %}
-{{ l }}
+{%- for l in token_lines %}
+  {{ l }}
 {%- endfor %}
 
 I have set for you the nickname, within the game, of
index 37b62102933ea5decd57702b8a7664dd3715d88e..6060fb8f7982debc9ac47256ff2582106c24ddf5 100644 (file)
@@ -984,6 +984,10 @@ impl CommandStream<'_> {
                 p: PermSet<TablePermission>)
                 -> Authorisation<InstanceName>
     {
+      if let Some(superuser) = cs.superuser {
+        return superuser.into();
+      }
+
       let current_account = cs.current_account()?;
       let (_subject_record, subject_acctid) =
         ag.lookup(&current_account.notional_account)?;