checking user's studip permission level when switching to edit mode or posting file; fixes #10