Adding roles check function.