Added authorization to posts controller