Fixed permission bug, added permission check of edit and update.
Merge branch 'rails4' of https://github.com/IdeaHat/expertiza into rails4