One can use one's
discretion
NOUN2 The freedom to decide what should be done in a particular situation.
He believes officers should use their discretion when dealing with speeding offences.
Rules say bus drivers can use their discretion regarding dogs but they must have a valid reason for refusing.
From Lexico.
For Example 1:
The office typically requires employees to leave by 7:00 PM, but since the project deadline is approaching the manager uses their discretion to allow a few developers to stay late.