- Changed permission check in document save method.