Portrait painter keeps young lady, as permitted by law (7)
I believe the answer is:
legally
'by law' is the definition.
(synonyms)
'portrait painter keeps young lady' is the wordplay.
'portrait painter' becomes 'lely' (I've seen this in other clues).
'keeps' means one lot of letters goes inside another (inserted letters are kept inside).
'young lady' becomes 'gal' (synonyms).
'lely' going around 'gal' is 'LEGALLY'.
'as permitted' is the link.
This may not be right. Some or all of it may belong to another bit of the clue.
Can you help me to learn more?
(Other definitions for legally that I've seen before include "abiding by the rules" , "In a manner approved by law" , "according to the national regulations" , "As regards the law" , "without breaking the law" .)