[General] Removing building certain buildings/units?

Level 4
Jan 18, 2016
Hi all,
You know how in warcraft campaign, in the first few missions, the worker unit won't have access to all the buildings and the barracks will only be able to train just the first tier unit? How do we go about doing that?

Or am I supposed to just create a worker unit that has access to those buildings in the object editor? Same for the building being able to only train footman/grunt/archer etc