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 diff
     1.1 --- a/s4-funcs.sh	Mon Apr 13 08:48:13 2020 +0900
     1.2 +++ b/s4-funcs.sh	Mon Apr 13 20:24:22 2020 +0900
     1.3 @@ -1628,6 +1628,14 @@
     1.4    _m4 -D_BODYCLASS_=groupconf -D_TITLE_="グループ情報編集" $layout/html.m4.html
     1.5    #rowid=`query "select rowid from grp where gname='$1';"`
     1.6    rowid=${1%%[!A-Z0-9a-z_]*}
     1.7 +
     1.8 +  ### If user is not admin, lead to group home
     1.9 +  grp=`getgroupbyid $rowid`
    1.10 +  if ! isgrpowner "$user" "$grp"; then
    1.11 +    echo "<p><a href=\"?grp+$rowid\">`echo "$grp"|htmlescape`</a></p>"
    1.12 +    return
    1.13 +  fi
    1.14 +
    1.15    # GF_ACTION="?grp+$1" edittable "$formdir/grp.def" "grp" "$rowid" #2015-0804
    1.16    GF_STAGE="groupupdate" edittable "$formdir/grp.def" "grp" "$rowid"
    1.17    if [ -z "$STOPCLONEMSG" ]; then