Added permission check to Class Controller.