MIFOSX-1670 : Modified Code for Role Functionality

@vishwasbabu 

This is complete new pull request for role functionality
there is no need to pass in the error code as an argument (since all callers are really expected to pass in the same error code)