Skip to content

[75226] Update XWiki auth integration#23321

Open
shiroginne wants to merge 18 commits into
devfrom
implementation/75226-update-auth-with-xwiki
Open

[75226] Update XWiki auth integration#23321
shiroginne wants to merge 18 commits into
devfrom
implementation/75226-update-auth-with-xwiki

Conversation

@shiroginne
Copy link
Copy Markdown
Contributor

@shiroginne shiroginne commented May 22, 2026

Ticket

75226
Update the OAuth registration for XWiki because the client registration has been added.
Update the UI/UX of the Wiki provider.

Screenshots

Screenshot 2026-05-26 at 16 30 37 Screenshot 2026-05-26 at 16 30 46 Screenshot 2026-05-26 at 16 31 03

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

Remove outdated code, since now we can use the parent OAuth.
@shiroginne shiroginne self-assigned this May 22, 2026
@shiroginne shiroginne changed the title [75226] Update the XWiki auth screen [75226] Update XWiki auth integration May 22, 2026
class User < BaseQuery
def call(auth_strategy:)
url = "#{provider.url.chomp('/')}/rest/"
url = "#{provider.url.chomp('/')}/rest/wikis/xwiki/user"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the new user rest endpoint, more user data could be fetcher from this endpoint if we ever need it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

provider_oauth: XWiki OAuth
provider_oauth_description: Allow OpenProject to access XWiki data using OAuth. A client ID is automatically generated to identify OpenProject to XWikino manual configuration is needed on the XWiki side.
provider_oauth: Wiki OAuth
provider_oauth_description: Allow OpenProject to access XWiki data using OAuth. A client ID and client secret have been pre-generated for youcopy them along with the redirect URI into your XWiki OIDC client registration. You can change the client ID and secret if needed.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dominic-braeunlein will provide better text here 😄

@shiroginne shiroginne marked this pull request as ready for review May 26, 2026 15:38
@shiroginne shiroginne requested a review from a team May 26, 2026 15:38
@github-actions
Copy link
Copy Markdown

Caution

The provided work package version does not match the core version

Details:

Please make sure that:

  • The work package version OR your pull request target branch is correct

Comment thread modules/wikis/app/models/wikis/xwiki_provider.rb Outdated
end

page.with_sidebar(col_placement: :end, row_placement: :start) do
page.with_sidebar(col_placement: :end, row_placement: :end) do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this. I wanted to complain that we use row_placement: :start in storages, but that's a lie.

I must have misremembered this.

oauth_application_details_html: The client secret value will not be accessible again after you close this window. Please copy these values into the [XWiki OpenProject Integration settings](xwiki_admin_link).
provider_types:
xwiki:
name: XWiki
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was surprised to see a separate translation for this, because activerecord.models.wikis/xwiki_provider exists (accessible through XWikiProvider.model_name.human).

However, there we translate it as "XWiki provider". I am wondering whether we should have separate translations or whether we could (for example) translate the model as "XWiki" everywhere.

Copy link
Copy Markdown
Contributor Author

@shiroginne shiroginne May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I've moved to model_name.human, but it shows "provider" in the translation, so we need just a provider name in those places:
Screenshot 2026-05-27 at 15 35 58
Screenshot 2026-05-27 at 15 36 10

I'd say we could keep different translations 🤔 in case if we'll rename the model name to just a provider name (dropping "provider"), we could have another round of discussions 😅 we could have one after the first part of the integration would be finished

Comment thread modules/wikis/config/locales/en.yml Outdated
Comment thread modules/wikis/config/locales/en.yml Outdated
oauth_configuration: OAuth configuration
url_caption: Please add the host address of your wiki platform including the https://. It should not be longer than 255 characters.
xwiki_instance: XWiki Instance
xwiki_instance: Wiki Provider
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to admit that I don't understand this translation string anymore.

The I18n key is wikis.admin.wiki_providers.xwiki_instance and we translate it with Wiki Provider?

This doesn't click with me. Also noteworthy that this translation could already be obtained through Wikis::Provider.model_name.human.

Copy link
Copy Markdown
Contributor Author

@shiroginne shiroginne May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lazy translation 😓 we started with instance and now decided on provider, the translation was updated, but not the keys. I'll update the keys to _provider + drop unused ones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants