Changes for page 新しい学校ページを作成
Last modified by Super Admin on 2026/03/22 00:39
From version
22.1
edited by Super Admin
on 2026/03/09 11:59
on 2026/03/09 11:59
Change comment:
There is no comment for this version
To version
24.1
edited by Super Admin
on 2026/03/10 21:30
on 2026/03/10 21:30
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Content
-
... ... @@ -27,7 +27,9 @@ 27 27 ## ページをプログラム的に作成 28 28 #set($newDoc = $xwiki.getDocument($targetPage)) 29 29 ## SchoolTemplateのコンテンツを参照として設定(テンプレートの include) 30 - $newDoc.setContent('{{include reference="SeitokaiCode.SchoolTemplate" /}}') 30 + ## author="target" により、SchoolTemplateの作者(superadmin)の権限でVelocityを実行 31 + ## これがないと学校ページの作者(一般ユーザー)のscript権限が必要になりエラーになる 32 + $newDoc.setContent('{{include reference="SeitokaiCode.SchoolTemplate" author="target" /}}') 31 31 $newDoc.setTitle($schoolName) 32 32 $newDoc.setParent('Schools.WebHome') 33 33 ## SchoolClassオブジェクトを追加して初期値を設定 ... ... @@ -195,7 +195,7 @@ 195 195 // 既存ページあり 196 196 document.getElementById('duplicateWarning').style.display = 'block'; 197 197 document.getElementById('duplicateLink').href = 198 - '/bin/ view/Schools/' + school.code + '/';200 + '/bin/Schools/' + school.code + '/'; 199 199 document.getElementById('submitArea').style.display = 'none'; 200 200 } else { 201 201 // 新規作成OK