s4

changeset 950:4099e5a30e27

Limit users who can invite others by setting INVITE_ONLYFROM
author HIROSE Yuuji <yuuji@gentei.org>
date Wed, 03 Nov 2021 14:38:15 +0900
parents d8a258cc8a7d
children 41032d34324d
files s4-funcs.sh
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/s4-funcs.sh	Sat Oct 30 16:55:35 2021 +0900
     1.2 +++ b/s4-funcs.sh	Wed Nov 03 14:38:15 2021 +0900
     1.3 @@ -1757,6 +1757,12 @@
     1.4  }
     1.5  invite() {
     1.6    email=`getpar email | tr '[A-Z]' '[a-z]'`
     1.7 +  if [ -n "$INVITE_ONLYFROM" ]; then
     1.8 +    if ! echo "$user" | grep -E -e "$INVITE_ONLYFROM" >/dev/null 2>&1; then
     1.9 +      echo "招待可能ユーザに登録されていません" | html p
    1.10 +      return
    1.11 +    fi
    1.12 +  fi
    1.13    case "$email" in
    1.14      *@*@*|*\ *)  repo="無効なアドレスです" ;;
    1.15      *@*)