Put a piece of painters tape (masking tape) over the area or edge to be glued before putting on any finish. I pre-finish alot of things before assembly and have found that most wood glues need raw wood to adhear well.
After the finish has dried, pull off the tape and glue as normal.
Some finish just under the edges will not hurt too much as long as you have plenty of raw wood space for the glue to grip.
Rog