change roles to type
Merge branch 'milestone6' of https://github.com/WSO2Mobile/mdm into milestone6