Updated Privileges implementation to use API methods.

This update fixes a case-sensitivity issue with using the group tree as it is.