Supreme Court rules on rights of retention