Skip to content

Commit

Permalink
Consolidate access to isSingleUserMode && showAccountInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Mar 19, 2024
1 parent 9c7a8a0 commit 4414013
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions client/src/components/User/UserPreferences.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
:description="link.description"
:to="`/user/${index}`" />
<UserPreferencesElement
v-if="isConfigLoaded && !config.single_user"
v-if="!isSingleUserMode"
id="edit-preferences-permissions"
icon="fa-users"
title="Set Dataset Permissions for New Histories"
Expand Down Expand Up @@ -89,7 +89,7 @@
</b-collapse>
</UserPreferencesElement>
<UserPreferencesElement
v-if="isConfigLoaded && !config.single_user"
v-if="!isSingleUserMode"
id="edit-preferences-make-data-private"
icon="fa-lock"
title="Make All Data Private"
Expand All @@ -103,7 +103,7 @@
:user-id="userId">
</UserPreferredObjectStore>
<UserDeletion
v-if="isConfigLoaded && !config.single_user && config.enable_account_interface"
v-if="!isSingleUserMode && enableAccountInterface"
:email="email"
:user-id="userId">
</UserDeletion>
Expand Down Expand Up @@ -205,14 +205,20 @@ export default {
},
hasLogout() {
const Galaxy = getGalaxyInstance();
return !!Galaxy.session_csrf_token && !this.config.single_user;
return !!Galaxy.session_csrf_token && !this.isSingleUserMode;
},
hasThemes() {
return this.isConfigLoaded && Object.keys(this.config.themes).length > 1;
},
userPermissionsUrl() {
return withPrefix("/user/permissions");
},
isSingleUserMode() {
return this.isConfigLoaded && this.config.single_user_mode;
},
enableAccountInterface() {
return this.isConfigLoaded && this.config.enable_account_interface;
}
},
created() {
const message = QueryStringParsing.get("message");
Expand Down

0 comments on commit 4414013

Please sign in to comment.