위키 액션에 권한주기
[ Plugin / Security for Wiki Action / Leave Comment ]
- Pmwiki는 if구문으로 어느 페이지나 나만 볼 수 있는 글을 쓸 수 있다. 그러나 그렇게 쓰더라도 Source나 History(diff) 또는 Rss로 내보내면 무용지물.
config.php에 추가할 것들php- // diff나 source 액션을 허용할 그룹들 array
- function SourceShowGroup($pagename){
- global $SourceShowGroups;
- $matchGroup = false;
- for($c=0; $c<count($SourceShowGroups); $c++){
- $matchGroup = false;
- } else {
- $matchGroup = true; break;
- }
- }
- return $matchGroup;
- }
- if (SourceShowGroup($pagename)) {
- $HandleAuth['source'] = 'read';
- $HandleAuth['diff'] = 'read';
- } else {
- $HandleAuth['source'] = 'edit';
- $HandleAuth['diff'] = 'edit';
- }
- RSS도 비슷하게 설정해주면 된다.