The question is oddly phrased: The law does not give allowances for its violation.
Many laws have exceptions. E.g., the law against killing endangered animals contains an exception for defensive killingsthe law against killing endangered animals contains an exception for defensive killings.
Perhaps you are thinking of safe harbors? For example, there are general provisions in the law like "exigent circumstances" that allow police to proceed with actions that, absent those provisions, would constitute violations of law.
"Permission" to violate a right can be granted explicitly in the form of a warrant, which allows law enforcement to "violate" specific property and freedom rights.
Finally, one might consider an executive pardon or jury-nullification to be ex post "permission to break the law."