Discrimination is bad when it's at a societal level, i.e. when it affects your access to products and services and jobs.
Discrimination is okay when it's at a personal level, i.e. who you want to associate/interact with.
Discrimination is always okay when it's regarding your capabilities, what you can do and how well you can do it. It's ok to discriminate against people who can't do useful things or who do actively harmful things (including committing crimes).