Check workspace when whecking badge awarding rules respect

Add restriction on wokrspace for checking if rules are respected when checking for badge awarding.

If the badge has a workspace we check il the action occured on this wokrspace, if not rules are not respected.