function _adjustScopeOrderForProject(scopeOrder, includeProject) {
        var hasProject = scopeOrder.indexOf("project") > -1;

        if (hasProject === includeProject) {
            return scopeOrder;
        }

        var newScopeOrder;

        if (includeProject) {
            var before = scopeOrder.indexOf("user");
            if (before === -1) {
                before = scopeOrder.length - 2;
            }
            newScopeOrder = _.take(scopeOrder, before);
            newScopeOrder.push("project");
            newScopeOrder.push.apply(newScopeOrder, _.drop(scopeOrder, before));
        } else {
            newScopeOrder = _.without(scopeOrder, "project");
        }
        return newScopeOrder;
    }
@private

Adjusts scopeOrder to have the project Scope if necessary.
Returns a new array if changes are needed, otherwise returns
the original array.

@param {Array.<string>} scopeOrder initial scopeOrder
@param {boolean} includeProject Whether the project Scope should be included
@return {Array.<string>} array with or without project Scope as needed.