src/org/ohmage/service/UserCampaignServices.java
public void verifyUserCanReadUsersInfoInCampaign(
			final String username, final String campaignId) 
			throws ServiceException  {
		
		try {
			if(! userCampaignQueries.getUserCampaignRoles(username, campaignId).contains(Campaign.Role.SUPERVISOR)) {
				throw new ServiceException(
						ErrorCode.CAMPAIGN_INSUFFICIENT_PERMISSIONS, 
						"The user is not allowed to read the personal information of the users in the following campaign: " + 
							campaignId);
			}
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
	}
/**
	 * Verifies that a user is allowed to read the personal information of all
	 * of the users in a campaign.
	 * 
	 * @param username The username of the user.
	 * 
	 * @param campaignId The campaign's unique identifier.
	 * 
	 * @throws ServiceException Thrown if the user isn't allowed to view the
	 * 							personal information about all of the users in
	 * 							the class or if there is an error.
	 */
Verifies that a user is allowed to read the personal information of all
of the users in a campaign.

@param username The username of the user.

@param campaignId The campaign's unique identifier.

@throws ServiceException Thrown if the user isn't allowed to view the
personal information about all of the users in
the class or if there is an error.
Verifies that a user is allowed to read the personal information of all of the users in a campaign . @param username The username of the user . @param campaignId The campaign ' s unique identifier . @throws ServiceException Thrown if the user isn ' t allowed to view the personal information about all of the users in the class or if there is an error .
public void verifyUserCanReadUsersInfoInCampaign(
			final String username, final String campaignId) 
			throws ServiceException  {
		try {
			if(! userCampaignQueries.getUserCampaignRoles(username, campaignId).contains(Campaign.Role.SUPERVISOR)) {
				throw new ServiceException(
						ErrorCode.CAMPAIGN_INSUFFICIENT_PERMISSIONS, 
						"The user is not allowed to read the personal information of the users in the following campaign: " + 
							campaignId);
			}
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
	}
public void verifyUserCanReadUsersInfoInCampaign ( final String username , final String campaignId ) throws ServiceException { try { if ( ! userCampaignQueries . getUserCampaignRoles ( username , campaignId ) . contains ( Campaign . Role . SUPERVISOR ) ) { throw new ServiceException ( ErrorCode . CAMPAIGN_INSUFFICIENT_PERMISSIONS , "The user is not allowed to read the personal information of the users in the following campaign: " + campaignId ) ; } } catch ( DataAccessException e ) { throw new ServiceException ( e ) ; } }
Verifies that a user is allowed to read the personal information of all
 of the users in a campaign.
Verifies that a user is allowed to read the personal information of all of the users in a campaign .