How to set restrictions for my document?