By rights has 2 different meanings across 2 categories:
Adverb · Prep_phrase
with reason or justice
Properly, in justice.