Changed user.has_perm(...) to has_perm(user, ...) at any place. Removed old code
Renamed model to Topic. Added migrations file. Fixed #2402.