"You are not authorized to set the ExperimenterGroupID" + " for %s to %d", obj, source.getGroup() .getId()));
"You are not authorized to set the ExperimenterGroup" + " for %s to %s", obj, source.getGroup()));
	public Details newTransientDetails(IObject obj) {		checkReady("transientDetails");		if (obj == null)			throw new ApiUsageException("Argument cannot be null.");				if (hasPrivilegedToken(obj))			return obj.getDetails(); // EARLY EXIT		Details source = obj.getDetails();		Details newDetails = cd.createDetails();		if (source != null) {			// PERMISSIONS			// users _are_ allowed to alter the permissions of new objects.			// this entity may be locked in the same operation, in which case			// the READ permissions which are set will not be removable.			copyNonNullPermissions(newDetails, source.getPermissions());			applyUmaskIfNecessary(newDetails);			// OWNER			// users *aren't* allowed to set the owner of an item.			if (source.getOwner() != null					&& !source.getOwner().getId().equals(							newDetails.getOwner().getId())) {				// but this is root				if (currentUserIsAdmin()) {					newDetails.setOwner(source.getOwner());				} else {					throw new SecurityViolation(String.format(							"You are not authorized to set the ExperimenterID"									+ " for %s to %d", obj, source.getOwner()									.getId()));				}			}			// GROUP			// users are only allowed to set to another of their groups			if (source.getGroup() != null && source.getGroup().getId() != null) {				// users can change to their own group				if (memberOfGroups().contains(source.getGroup().getId())) {					newDetails.setGroup(source.getGroup());				}				// and admin can change it too				else if (currentUserIsAdmin()) {					newDetails.setGroup(source.getGroup());				}				// oops. boom!				else {					throw new SecurityViolation(String.format(							"You are not authorized to set the ExperimenterGroupID"									+ " for %s to %d", obj, source.getGroup()									.getId()));				}			}			// EXTERNALINFO			// useres _are_ allowed to set the external info on a new object.			// subsequent operations, however, will not be able to edit this			// value.			newDetails.setExternalInfo( source.getExternalInfo() );			// CREATION/UPDATEVENT : currently ignore what users do					}		return newDetails;	}