# HG changeset patch # User HIROSE Yuuji # Date 1438697783 -32400 # Node ID 45d1b0f09e48143d7b0dc56864ac028011b775dc # Parent 82e215e7546832aa2b32e0374576d45354a748fd grpaction is limited to its member diff -r 82e215e75468 -r 45d1b0f09e48 s4-funcs.sh --- a/s4-funcs.sh Tue Aug 04 22:54:33 2015 +0900 +++ b/s4-funcs.sh Tue Aug 04 23:16:23 2015 +0900 @@ -290,6 +290,10 @@ # ./args.rb -cmd ".timeout 3000" "$@" sqlite3 -cmd 'PRAGMA foreign_keys=ON' -cmd ".timeout 3000" "$@" } +querycat() { + cat $sqo & + (echo .once $sqo; cat) > $sqi +} query() { cat< $sqi .once $sqo @@ -1648,8 +1652,10 @@ grid=${1:-`getpar grp`} grp=`getgroupbyid "$grid"` if [ -z "$grp" ]; then - echo "無効な指定です。" | html p - return + echo "無効な指定です。" | html p; return + fi + if ! ismember $user $grp; then + echo "加入者のみに許可された操作です。" | html p; return fi echo "グループ $grp 個別選択操作" \ | m4 -D_TITLE_="syscmd(\`cat')" $layout/html.m4.html @@ -2247,8 +2253,11 @@ fi ;; esac -## err p2t: "replace into $tb2 values($pval, \"$col\", $type, $val, $bin);" - query "replace into $tb2 values($pval, \"$col\", $type, $val, $bin);" + err p2t: "replace into $tb2 values($pval, \"$col\", $type, $val, bin...);" + #query "replace into $tb2 values($pval, \"$col\", $type, $val, $bin);" + echo "replace into $tb2 values($pval, \"$col\", $type, $val, $bin);" \ + | querycat + err p2t done done done done