src/org/ohmage/service/UserClassServices.java
public void userIsPrivilegedInAnotherUserClass(
			final String requesterUsername,
			final String otherUsername)
			throws ServiceException {
		
		try {
			Set<String> classIds = this.getClassesForUser(otherUsername, null);
			if(! userClassQueries.getUserClassRoles(
					requesterUsername, 
					classIds)
					.contains(Clazz.Role.PRIVILEGED)) {
				
				throw new ServiceException(
						ErrorCode.USER_INSUFFICIENT_PERMISSIONS, 
						"The requesting user is not privileged in any class to which the other user belongs.");
			}
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
	}
/**
	 * Verifies that a requesting user is privileged in any of another user's
	 * classes.
	 * 
	 * @param requesterUsername The requesting user's username.
	 * 
	 * @param otherUsername The other user's username.
	 * 
	 * @throws ServiceException Thrown if the requesting user is not privileged
	 * 							in any class to which the other user belongs.
	 */
Verifies that a requesting user is privileged in any of another user's
classes.

@param requesterUsername The requesting user's username.

@param otherUsername The other user's username.

@throws ServiceException Thrown if the requesting user is not privileged
in any class to which the other user belongs.
Verifies that a requesting user is privileged in any of another user ' s classes . @param requesterUsername The requesting user ' s username . @param otherUsername The other user ' s username . @throws ServiceException Thrown if the requesting user is not privileged in any class to which the other user belongs .
public void userIsPrivilegedInAnotherUserClass(
			final String requesterUsername,
			final String otherUsername)
			throws ServiceException {
		try {
			Set<String> classIds = this.getClassesForUser(otherUsername, null);
			if(! userClassQueries.getUserClassRoles(
					requesterUsername, 
					classIds)
					.contains(Clazz.Role.PRIVILEGED)) {
				throw new ServiceException(
						ErrorCode.USER_INSUFFICIENT_PERMISSIONS, 
						"The requesting user is not privileged in any class to which the other user belongs.");
			}
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
	}
public void userIsPrivilegedInAnotherUserClass ( final String requesterUsername , final String otherUsername ) throws ServiceException { try { Set < String > classIds = this . getClassesForUser ( otherUsername , null ) ; if ( ! userClassQueries . getUserClassRoles ( requesterUsername , classIds ) . contains ( Clazz . Role . PRIVILEGED ) ) { throw new ServiceException ( ErrorCode . USER_INSUFFICIENT_PERMISSIONS , "The requesting user is not privileged in any class to which the other user belongs." ) ; } } catch ( DataAccessException e ) { throw new ServiceException ( e ) ; } }
Verifies that a requesting user is privileged in any of another user's
 classes.
Verifies that a requesting user is privileged in any of another user ' s classes .