Mercurial > hgrepos > hgweb.cgi > s4
changeset 607:d0068e9e6bd7
If user is not admin, lead to group home in groupconf()
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Mon, 13 Apr 2020 20:24:22 +0900 |
parents | 00837fdf1120 |
children | 07ec77f4e224 |
files | s4-funcs.sh |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-funcs.sh Mon Apr 13 08:48:13 2020 +0900 +++ b/s4-funcs.sh Mon Apr 13 20:24:22 2020 +0900 @@ -1628,6 +1628,14 @@ _m4 -D_BODYCLASS_=groupconf -D_TITLE_="グループ情報編集" $layout/html.m4.html #rowid=`query "select rowid from grp where gname='$1';"` rowid=${1%%[!A-Z0-9a-z_]*} + + ### If user is not admin, lead to group home + grp=`getgroupbyid $rowid` + if ! isgrpowner "$user" "$grp"; then + echo "<p><a href=\"?grp+$rowid\">`echo "$grp"|htmlescape`</a></p>" + return + fi + # GF_ACTION="?grp+$1" edittable "$formdir/grp.def" "grp" "$rowid" #2015-0804 GF_STAGE="groupupdate" edittable "$formdir/grp.def" "grp" "$rowid" if [ -z "$STOPCLONEMSG" ]; then