Setting privileges

Add some privileges settings related APIs.