CAS authentication for redmine instances with public areas

With this hack, you can have public pages and CAS-authentication. The only problem is that you can *only* have CAS-authentication. So if you configure CAS incorrectly, or you don't have an administrator with a CAS-account, you have to hack the database to get access again.

If you can help me with a solution for this problem, please let me know.