Skip to content

Commit

Permalink
Merge pull request galaxyproject#18887 from maartenschermer/user-pref…
Browse files Browse the repository at this point in the history
…erences-remote-users

Enable extra user preferences for remotely authorized users
  • Loading branch information
dannon authored Oct 16, 2024
2 parents 4e56b47 + 7a7a278 commit 3e15aa0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions client/src/components/User/UserPreferencesModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ export const getUserPreferencesModel = (user_id) => {
information: {
title: _l("Manage Information"),
id: "edit-preferences-information",
description: config.enable_account_interface
? _l("Edit your email, addresses and custom parameters or change your public name.")
: _l("Edit your custom parameters."),
description:
config.enable_account_interface && !config.use_remote_user
? _l("Edit your email, addresses and custom parameters or change your public name.")
: _l("Edit your custom parameters."),
url: `/api/users/${user_id}/information/inputs`,
icon: "fa-user",
redirect: "/user",
disabled: config.use_remote_user,
},
password: {
title: _l("Change Password"),
Expand Down
1 change: 1 addition & 0 deletions lib/galaxy/web/framework/middleware/remoteuser.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def __call__(self, environ, start_response):
"/user/api_key",
"/user/edit_username",
"/user/dbkeys",
"/user/information",
"/user/logout",
"/user/toolbox_filters",
"/user/set_default_permissions",
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/webapps/galaxy/api/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ def get_information(self, trans, id, **kwd):
"username": username,
}
is_galaxy_app = trans.webapp.name == "galaxy"
if trans.app.config.enable_account_interface or not is_galaxy_app:
if (trans.app.config.enable_account_interface and not trans.app.config.use_remote_user) or not is_galaxy_app:
inputs.append(
{
"id": "email_input",
Expand All @@ -826,7 +826,7 @@ def get_information(self, trans, id, **kwd):
}
)
if is_galaxy_app:
if trans.app.config.enable_account_interface:
if trans.app.config.enable_account_interface and not trans.app.config.use_remote_user:
inputs.append(
{
"id": "name_input",
Expand Down

0 comments on commit 3e15aa0

Please sign in to comment.