Fixed identifiers naming. Refactored code to use context managers.
Make adjustPrivilege a public method.