It is really bad that CodeIgniter does not support password protection in scaffolding. I just go thorugh most scaffolding related posts in CodeIgniter forum, it seems no easy and clear solution for it. So, I just come out my own based on hooks function.
Here comes the code. Just follow it, and you will get a simple password protection for scaffolding: