Added external controller method for privileges.

Method returns all possible privileges in JSON format.