mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
2a0aac1fa9
The main purpose is to make a deduplicating identifier available for interaction with integrations. We want to start using it for the integration with XWiki, but the underlying problem occurs regularly in integrations: It's possible for an OP instance to integrate with more than one XWiki instance. Vice versa it's also possible for one XWiki to integrate with multiple OPs. When this happens, API calls like "show me wiki pages that point to work package 123" become ambiguous, because WP 123 might exist on multiple OpenProject instances. Thus it makes sense to have a global identifier for the OpenProject instance. Different identifiers look good and unique at first, but they are not working well in detail: * Base URL (e.g. https://openproject.example.com): Some instances are available via more than one URL, e.g. inside cluster vs. outside cluster. * OAuth client ID: Usually not known to other party, and not guaranteed to be unique, because multiple authentication providers could be involved Hence we decided to use a uniquely generated ID and expose it in a way that doesn't require additional configuration by the users, but can be automatically discovered during integration setup.
42 lines
1.4 KiB
Ruby
42 lines
1.4 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
#-- copyright
|
|
# OpenProject is an open source project management software.
|
|
# Copyright (C) the OpenProject GmbH
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License version 3.
|
|
#
|
|
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
|
|
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
|
# Copyright (C) 2010-2013 the ChiliProject Team
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# as published by the Free Software Foundation; either version 2
|
|
# of the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
#
|
|
# See COPYRIGHT and LICENSE files for more details.
|
|
#++
|
|
|
|
class OpenprojectMetadataController < ApplicationController
|
|
no_authorization_required! :show
|
|
|
|
skip_before_action :check_if_login_required
|
|
|
|
def show
|
|
render json: {
|
|
installation_uuid: Setting.installation_uuid
|
|
}
|
|
end
|
|
end
|