Implement permission endpoints and add permission resource fields. bugid:112440