Activate Maintenance Mode

With this snippet, pasted in your functions.php file, you can activate the wordress maintenance mode. In this example every user, who can edit themes is allowed to see the wordpress frontend.

Other relevant snippets: