Added pk attribute check  in roles check, instead of just checking roles;