Add permission and user_log unittest.

Fixed the bug in db/api/user_log.py

Change-Id: I975160375abb7bfea5ba5861fb1a9d545debd6b5
Merge "Add permission and user_log unittest." into dev/experimental