수정 권한이 없는 페이지에서는 더블 클릭을 작동하지 않게 함
- 필수 요구 사항: 없음
- 선택 요구 사항: 없음
- 부작용:
- 때에 따라서 더블 클릭이 되었다 말았다 하는 게 더 혼란스러울 수도?
-
sub GetHtmlHeader {
...
$bodyExtra .= qq(ondblclick="location.href='$ScriptName?action=edit&id=$id'") if (&UserCanEdit($id,0));
...
}
"if &UserCanEdit($id,0)", can be supressed. Optionally, "Sub DoEdit" is still secure with $canEdit.
- Yes, but in the following two candidates:
1) double click -> nothing happens
2) double click -> edit screen -> show "you don't have permission..."
I thought 1) is better than 2).
Anyway, this code is meaningless now. because currently wiki shows "page source (not editable)" if user doesn't have permission. So double click always works now.
위키위키분류