Slight optimization in record_dao.
Correct auth permission bug caused by recent changes in framework layout.
Small optmizations in record_dao.