Thank you a lot for advice.
I also changed owner of wiki and deleted old-owner account before current
problem. Current owner in XWikiServerClass is new owner.
(XWiki was in preproduction state, without valuable content. I was just
"playing" with it, to get practice. Now is probably not absolutely
It's not related to the user viewing the document but to the author of
the document. Whoever modify a document need SCRIPT right if the
document content contains scripts to execute. Either you removed
SCRIPT right to a user who created a few pages with scripts inside or
some user without SCRIPT