Change mode from string to integer
Category privilege

Category privilege system is set up. Relevant tests are also finished.
Topic privilege

Topic privilege system is set up. Some minor change in specs for
category privileges.