Mercurial > hgrepos > hgweb.cgi > s4
changeset 950:4099e5a30e27 draft
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 wrap: on
line diff
--- a/s4-funcs.sh Sat Oct 30 16:55:35 2021 +0900 +++ b/s4-funcs.sh Wed Nov 03 14:38:15 2021 +0900 @@ -1757,6 +1757,12 @@ } invite() { email=`getpar email | tr '[A-Z]' '[a-z]'` + if [ -n "$INVITE_ONLYFROM" ]; then + if ! echo "$user" | grep -E -e "$INVITE_ONLYFROM" >/dev/null 2>&1; then + echo "招待可能ユーザに登録されていません" | html p + return + fi + fi case "$email" in *@*@*|*\ *) repo="無効なアドレスです" ;; *@*)