From: Ian Jackson Date: Sat, 5 Dec 2020 17:02:43 +0000 (+0000) Subject: email tokens, fixes X-Git-Tag: otter-0.2.0~271 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=ec0266a3ce6118c2b284b9cec192b630ff014d96;p=otter.git email tokens, fixes Signed-off-by: Ian Jackson --- diff --git a/nwtemplates/token-other.tera b/nwtemplates/token-other.tera index e58c2411..62be7c04 100644 --- a/nwtemplates/token-other.tera +++ b/nwtemplates/token-other.tera @@ -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 diff --git a/nwtemplates/token-unix.tera b/nwtemplates/token-unix.tera index dccebe3f..103fe1d0 100644 --- a/nwtemplates/token-unix.tera +++ b/nwtemplates/token-unix.tera @@ -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 diff --git a/src/cmdlistener.rs b/src/cmdlistener.rs index 37b62102..6060fb8f 100644 --- a/src/cmdlistener.rs +++ b/src/cmdlistener.rs @@ -984,6 +984,10 @@ impl CommandStream<'_> { p: PermSet) -> Authorisation { + if let Some(superuser) = cs.superuser { + return superuser.into(); + } + let current_account = cs.current_account()?; let (_subject_record, subject_acctid) = ag.lookup(¤t_account.notional_account)?;