Can. 987 To receive the salvific remedy of the sacrament of penance, a member of the Christian faithful must be disposed in such a way that, rejecting sins committed and having a purpose of amendment, the person is turned back to God.
That is the discretion of the priest weather this conditions are present or not.
Above this no priest can absolve (except is deathbed) penitent under reserved excommunication
Can. 1367 A person who throws away the consecrated species or takes or retains them for a sacrilegious purpose incurs a latae sententiae excommunication reserved to the Apostolic See; moreover, a cleric can be punished with another penalty, not excluding dismissal from the clerical state.
Can. 1370 §1. A person who uses physical force against the Roman Pontiff incurs a latae sententiae excommunication reserved to the Apostolic See; if he is a cleric, another penalty, not excluding dismissal from the clerical state, can be added according to the gravity of the delict.
Can. 977 The absolution of an accomplice in a sin against the sixth commandment of the Decalogue is invalid except in danger of death.
Can. 1378 §1. A priest who acts against the prescript of ⇒ can. 977 incurs a latae sententiae excommunication reserved to the Apostolic See.
Can. 1382 A bishop who consecrates some one a bishop without a pontifical mandate and the person who receives the consecration from him incur a latae sententiae excommunication reserved to the Apostolic See.