Connected Emails
Connected Emails
Connected Emails
Connected Emails
Default storage location
Default storage location
Connected identities
Connected identities
Affiliated institutions
Affiliated institutions
Opt out of SHARE indexing
+ By default, OSF users are indexed into SHARE, a free, open dataset of research metadata. This allows SHARE to + include your user profile and research in its database, which is used by search engines and other services to make + research more discoverable. You can opt out of this indexing by checking the box below. NOTE: Public projects, + files, registrations, and preprints will still be indexed in SHARE.
Learn more about SHARE
Change Password
aria-describedby="username-help" [formControlName]="AccountSettingsPasswordFormControls.OldPassword" /> - Enter your username to reset your password. + Enter your username to reset your password.Change Password
aria-describedby="username-help" [formControlName]="AccountSettingsPasswordFormControls.NewPassword" /> - Enter your username to reset your password. + Enter your username to reset your password.Change Password
pInputText id="confirm-password" aria-describedby="username-help" - [formControlName]=" - AccountSettingsPasswordFormControls.ConfirmPassword - " + [formControlName]="AccountSettingsPasswordFormControls.ConfirmPassword" /> - Enter your username to reset your password. + Enter your username to reset your password.Change Password
Two-factor authentication
Two-factor authentication
Deactivate Account
-Are you sure you want to to deactivate your account?
{{ card()?.displayName }}
-- {{ "settings.addons.messages.deleteConfirmation.message" | translate }} + {{ 'settings.addons.messages.deleteConfirmation.message' | translate }}
- {{ "settings.addons.description" | translate }} + {{ 'settings.addons.description' | translate }}
{{ addon()?.providerName }} - {{ "settings.addons.connectAddon.terms" | translate }} + {{ 'settings.addons.connectAddon.terms' | translate }}
- {{
- "settings.addons.connectAddon.termsDescription" | translate
- }}
+ {{ 'settings.addons.connectAddon.termsDescription' | translate }}
- {{
- "settings.addons.connectAddon.storageDescription" | translate
- }}
+ {{ 'settings.addons.connectAddon.storageDescription' | translate }}
@@ -74,163 +63,109 @@
-
- {{ - "settings.addons.connectAddon.termsDescription" | translate - }} + {{ 'settings.addons.connectAddon.termsDescription' | translate }}
- {{ - "settings.addons.connectAddon.storageDescription" | translate - }} + {{ 'settings.addons.connectAddon.storageDescription' | translate }}
- {{ "settings.addons.connectAddon.setupNewAccount" | translate }}
+ {{ 'settings.addons.connectAddon.setupNewAccount' | translate }}
- {{ "settings.addons.connectAddon.oauthDescription" | translate }}
+ {{ 'settings.addons.connectAddon.oauthDescription' | translate }}
-
- {{ "settings.addons.connectAddon.startOauth" | translate }}
+
+ {{ 'settings.addons.connectAddon.startOauth' | translate }}
diff --git a/src/app/features/settings/addons/connect-addon/connect-addon.component.ts b/src/app/features/settings/addons/connect-addon/connect-addon.component.ts
index bced3de4a..31954e60a 100644
--- a/src/app/features/settings/addons/connect-addon/connect-addon.component.ts
+++ b/src/app/features/settings/addons/connect-addon/connect-addon.component.ts
@@ -10,39 +10,15 @@ import { StepPanel, StepPanels, Stepper } from 'primeng/stepper';
import { TableModule } from 'primeng/table';
import { NgClass } from '@angular/common';
-import {
- Component,
- computed,
- effect,
- inject,
- signal,
- viewChild,
-} from '@angular/core';
-import {
- FormBuilder,
- FormGroup,
- FormsModule,
- ReactiveFormsModule,
- Validators,
-} from '@angular/forms';
+import { Component, computed, effect, inject, signal, viewChild } from '@angular/core';
+import { FormBuilder, FormGroup, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
import { Router, RouterLink } from '@angular/router';
-import {
- AddonForm,
- AddonFormControls,
-} from '@osf/features/settings/addons/entities/addon-form.entities';
+import { AddonForm, AddonFormControls } from '@osf/features/settings/addons/entities/addon-form.entities';
import { AddonTerm } from '@osf/features/settings/addons/entities/addon-terms.interface';
-import {
- Addon,
- AddonRequest,
- AuthorizedAddon,
-} from '@osf/features/settings/addons/entities/addons.entities';
+import { Addon, AddonRequest, AuthorizedAddon } from '@osf/features/settings/addons/entities/addons.entities';
import { CredentialsFormat } from '@osf/features/settings/addons/entities/credentials-format.enum';
-import {
- AddonsSelectors,
- CreateAuthorizedAddon,
- UpdateAuthorizedAddon,
-} from '@osf/features/settings/addons/store';
+import { AddonsSelectors, CreateAuthorizedAddon, UpdateAuthorizedAddon } from '@osf/features/settings/addons/store';
import { SubHeaderComponent } from '@shared/components/sub-header/sub-header.component';
import { ADDON_TERMS as addonTerms } from '../utils/addon-terms.const';
@@ -87,21 +63,14 @@ export class ConnectAddonComponent {
protected readonly addon = signal(null);
protected readonly addonAuthUrl = signal('/settings/addons');
protected readonly formControls = AddonFormControls;
- protected readonly userReference = this.#store.selectSignal(
- AddonsSelectors.getAddonUserReference,
- );
- protected createdAddon = this.#store.selectSignal(
- AddonsSelectors.getCreatedOrUpdatedStorageAddon,
- );
+ protected readonly userReference = this.#store.selectSignal(AddonsSelectors.getAddonUserReference);
+ protected createdAddon = this.#store.selectSignal(AddonsSelectors.getCreatedOrUpdatedStorageAddon);
protected readonly isConnecting = signal(false);
protected isAuthorized = computed(() => {
//check if the addon is already authorized
const addon = this.addon();
if (addon) {
- return (
- addon.type === 'authorized-storage-accounts' ||
- addon.type === 'authorized-citation-accounts'
- );
+ return addon.type === 'authorized-storage-accounts' || addon.type === 'authorized-citation-accounts';
}
return false;
});
@@ -109,8 +78,7 @@ export class ConnectAddonComponent {
//get the addon type string based on the addon type property
const addon = this.addon();
if (addon) {
- return addon.type === 'external-storage-services' ||
- addon.type === 'authorized-storage-accounts'
+ return addon.type === 'external-storage-services' || addon.type === 'authorized-storage-accounts'
? 'storage'
: 'citation';
}
@@ -147,11 +115,7 @@ export class ConnectAddonComponent {
.dispatch(
!this.isAuthorized()
? new CreateAuthorizedAddon(request, this.addonTypeString())
- : new UpdateAuthorizedAddon(
- request,
- this.addonTypeString(),
- this.addon()!.id,
- ),
+ : new UpdateAuthorizedAddon(request, this.addonTypeString(), this.addon()!.id)
)
.subscribe({
complete: () => {
@@ -174,54 +138,26 @@ export class ConnectAddonComponent {
if (addon) {
const formControls: Partial = {
- [AddonFormControls.AccountName]: this.#fb.control(
- addon.displayName || '',
- Validators.required,
- ),
+ [AddonFormControls.AccountName]: this.#fb.control(addon.displayName || '', Validators.required),
};
switch (addon.credentialsFormat) {
case CredentialsFormat.ACCESS_SECRET_KEYS:
- formControls[AddonFormControls.AccessKey] = this.#fb.control(
- '',
- Validators.required,
- );
- formControls[AddonFormControls.SecretKey] = this.#fb.control(
- '',
- Validators.required,
- );
+ formControls[AddonFormControls.AccessKey] = this.#fb.control('', Validators.required);
+ formControls[AddonFormControls.SecretKey] = this.#fb.control('', Validators.required);
break;
case CredentialsFormat.DATAVERSE_API_TOKEN:
- formControls[AddonFormControls.HostUrl] = this.#fb.control(
- '',
- Validators.required,
- );
- formControls[AddonFormControls.PersonalAccessToken] =
- this.#fb.control('', Validators.required);
+ formControls[AddonFormControls.HostUrl] = this.#fb.control('', Validators.required);
+ formControls[AddonFormControls.PersonalAccessToken] = this.#fb.control('', Validators.required);
break;
case CredentialsFormat.USERNAME_PASSWORD:
- formControls[AddonFormControls.HostUrl] = this.#fb.control(
- '',
- Validators.required,
- );
- formControls[AddonFormControls.Username] = this.#fb.control(
- '',
- Validators.required,
- );
- formControls[AddonFormControls.Password] = this.#fb.control(
- '',
- Validators.required,
- );
+ formControls[AddonFormControls.HostUrl] = this.#fb.control('', Validators.required);
+ formControls[AddonFormControls.Username] = this.#fb.control('', Validators.required);
+ formControls[AddonFormControls.Password] = this.#fb.control('', Validators.required);
break;
case CredentialsFormat.REPO_TOKEN:
- formControls[AddonFormControls.AccessKey] = this.#fb.control(
- '',
- Validators.required,
- );
- formControls[AddonFormControls.SecretKey] = this.#fb.control(
- '',
- Validators.required,
- );
+ formControls[AddonFormControls.AccessKey] = this.#fb.control('', Validators.required);
+ formControls[AddonFormControls.SecretKey] = this.#fb.control('', Validators.required);
break;
}
return this.#fb.group(formControls as AddonForm);
@@ -235,8 +171,7 @@ export class ConnectAddonComponent {
const addon = this.addon()!;
const credentials: Record = {};
const initiateOAuth =
- addon.credentialsFormat === CredentialsFormat.OAUTH2 ||
- addon.credentialsFormat === CredentialsFormat.OAUTH;
+ addon.credentialsFormat === CredentialsFormat.OAUTH2 || addon.credentialsFormat === CredentialsFormat.OAUTH;
switch (addon.credentialsFormat) {
case CredentialsFormat.ACCESS_SECRET_KEYS:
@@ -244,8 +179,7 @@ export class ConnectAddonComponent {
credentials['secret_key'] = formValue[AddonFormControls.SecretKey];
break;
case CredentialsFormat.DATAVERSE_API_TOKEN:
- credentials['personal_access_token'] =
- formValue[AddonFormControls.PersonalAccessToken];
+ credentials['personal_access_token'] = formValue[AddonFormControls.PersonalAccessToken];
break;
case CredentialsFormat.USERNAME_PASSWORD:
credentials['username'] = formValue[AddonFormControls.Username];
@@ -290,18 +224,14 @@ export class ConnectAddonComponent {
[`external_${this.addonTypeString()}_service`]: {
data: {
type: `external-${this.addonTypeString()}-services`,
- id: this.isAuthorized()
- ? (addon as AuthorizedAddon).externalStorageServiceId
- : (addon as Addon).id, //check if addon is already authorized and set relationship ID accordingly
+ id: this.isAuthorized() ? (addon as AuthorizedAddon).externalStorageServiceId : (addon as Addon).id, //check if addon is already authorized and set relationship ID accordingly
},
},
};
}
#getTerms(): AddonTerm[] {
- const addon = this.#router.getCurrentNavigation()?.extras.state?.[
- 'addon'
- ] as Addon | AuthorizedAddon;
+ const addon = this.#router.getCurrentNavigation()?.extras.state?.['addon'] as Addon | AuthorizedAddon;
if (!addon) {
this.#router.navigate(['/settings/addons']);
}
@@ -311,16 +241,12 @@ export class ConnectAddonComponent {
const provider = addon.providerName;
const isCitationService = addon.type === 'external-citation-services';
- const relevantTerms = isCitationService
- ? addonTerms.filter((term) => term.citation)
- : addonTerms;
+ const relevantTerms = isCitationService ? addonTerms.filter((term) => term.citation) : addonTerms;
return relevantTerms.map((term) => {
const feature = term.supportedFeature;
const hasFeature = supportedFeatures.includes(feature);
- const hasPartialFeature = supportedFeatures.includes(
- `${feature}_PARTIAL`,
- );
+ const hasPartialFeature = supportedFeatures.includes(`${feature}_PARTIAL`);
let message: string;
let type: 'warning' | 'info' | 'danger';
diff --git a/src/app/features/settings/addons/store/addons.actions.ts b/src/app/features/settings/addons/store/addons.actions.ts
index 6cb8d4a41..999a18004 100644
--- a/src/app/features/settings/addons/store/addons.actions.ts
+++ b/src/app/features/settings/addons/store/addons.actions.ts
@@ -25,7 +25,7 @@ export class CreateAuthorizedAddon {
constructor(
public payload: AddonRequest,
- public addonType: string,
+ public addonType: string
) {}
}
@@ -35,7 +35,7 @@ export class UpdateAuthorizedAddon {
constructor(
public payload: AddonRequest,
public addonType: string,
- public addonId: string,
+ public addonId: string
) {}
}
@@ -48,6 +48,6 @@ export class DeleteAuthorizedAddon {
constructor(
public payload: string,
- public addonType: string,
+ public addonType: string
) {}
}
diff --git a/src/app/features/settings/addons/store/addons.state.ts b/src/app/features/settings/addons/store/addons.state.ts
index 4424ba867..dec02f371 100644
--- a/src/app/features/settings/addons/store/addons.state.ts
+++ b/src/app/features/settings/addons/store/addons.state.ts
@@ -39,7 +39,7 @@ export class AddonsState {
return this.addonsService.getAddons('storage').pipe(
tap((addons) => {
ctx.patchState({ storageAddons: addons });
- }),
+ })
);
}
@@ -48,72 +48,52 @@ export class AddonsState {
return this.addonsService.getAddons('citation').pipe(
tap((addons) => {
ctx.patchState({ citationAddons: addons });
- }),
+ })
);
}
@Action(GetAuthorizedStorageAddons)
- getAuthorizedStorageAddons(
- ctx: StateContext,
- action: GetAuthorizedStorageAddons,
- ) {
- return this.addonsService
- .getAuthorizedAddons('storage', action.referenceId)
- .pipe(
- tap((addons) => {
- ctx.patchState({ authorizedStorageAddons: addons });
- }),
- );
+ getAuthorizedStorageAddons(ctx: StateContext, action: GetAuthorizedStorageAddons) {
+ return this.addonsService.getAuthorizedAddons('storage', action.referenceId).pipe(
+ tap((addons) => {
+ ctx.patchState({ authorizedStorageAddons: addons });
+ })
+ );
}
@Action(GetAuthorizedCitationAddons)
- getAuthorizedCitationAddons(
- ctx: StateContext,
- action: GetAuthorizedCitationAddons,
- ) {
- return this.addonsService
- .getAuthorizedAddons('citation', action.referenceId)
- .pipe(
- tap((addons) => {
- ctx.patchState({ authorizedCitationAddons: addons });
- }),
- );
+ getAuthorizedCitationAddons(ctx: StateContext, action: GetAuthorizedCitationAddons) {
+ return this.addonsService.getAuthorizedAddons('citation', action.referenceId).pipe(
+ tap((addons) => {
+ ctx.patchState({ authorizedCitationAddons: addons });
+ })
+ );
}
@Action(CreateAuthorizedAddon)
- createAuthorizedAddon(
- ctx: StateContext,
- action: CreateAuthorizedAddon,
- ): Observable {
- return this.addonsService
- .createAuthorizedAddon(action.payload, action.addonType)
- .pipe(
- tap((addon) => {
- ctx.patchState({ createdUpdatedAuthorizedAddon: addon });
- const referenceId = ctx.getState().addonsUserReference[0].id;
- return action.addonType === 'storage'
- ? ctx.dispatch(new GetAuthorizedStorageAddons(referenceId))
- : ctx.dispatch(new GetAuthorizedCitationAddons(referenceId));
- }),
- );
+ createAuthorizedAddon(ctx: StateContext, action: CreateAuthorizedAddon): Observable {
+ return this.addonsService.createAuthorizedAddon(action.payload, action.addonType).pipe(
+ tap((addon) => {
+ ctx.patchState({ createdUpdatedAuthorizedAddon: addon });
+ const referenceId = ctx.getState().addonsUserReference[0].id;
+ return action.addonType === 'storage'
+ ? ctx.dispatch(new GetAuthorizedStorageAddons(referenceId))
+ : ctx.dispatch(new GetAuthorizedCitationAddons(referenceId));
+ })
+ );
}
@Action(UpdateAuthorizedAddon)
- updateAuthorizedAddon(
- ctx: StateContext,
- action: UpdateAuthorizedAddon,
- ): Observable {
- return this.addonsService
- .updateAuthorizedAddon(action.payload, action.addonType, action.addonId)
- .pipe(
- tap((addon) => {
- ctx.patchState({ createdUpdatedAuthorizedAddon: addon });
- const referenceId = ctx.getState().addonsUserReference[0].id;
- return action.addonType === 'storage'
- ? ctx.dispatch(new GetAuthorizedStorageAddons(referenceId))
- : ctx.dispatch(new GetAuthorizedCitationAddons(referenceId));
- }),
- );
+ updateAuthorizedAddon(ctx: StateContext, action: UpdateAuthorizedAddon): Observable {
+ return this.addonsService.updateAuthorizedAddon(action.payload, action.addonType, action.addonId).pipe(
+ tap((addon) => {
+ ctx.patchState({ createdUpdatedAuthorizedAddon: addon });
+ const referenceId = ctx.getState().addonsUserReference[0].id;
+ return action.addonType === 'storage'
+ ? ctx.dispatch(new GetAuthorizedStorageAddons(referenceId))
+ : ctx.dispatch(new GetAuthorizedCitationAddons(referenceId));
+ })
+ );
}
@Action(GetAddonsUserReference)
@@ -121,24 +101,19 @@ export class AddonsState {
return this.addonsService.getAddonsUserReference().pipe(
tap((userReference) => {
ctx.patchState({ addonsUserReference: userReference });
- }),
+ })
);
}
@Action(DeleteAuthorizedAddon)
- deleteAuthorizedAddon(
- ctx: StateContext,
- action: DeleteAuthorizedAddon,
- ) {
- return this.addonsService
- .deleteAuthorizedAddon(action.payload, action.addonType)
- .pipe(
- switchMap(() => {
- const referenceId = ctx.getState().addonsUserReference[0].id;
- return action.addonType === 'storage'
- ? ctx.dispatch(new GetAuthorizedStorageAddons(referenceId))
- : ctx.dispatch(new GetAuthorizedCitationAddons(referenceId));
- }),
- );
+ deleteAuthorizedAddon(ctx: StateContext, action: DeleteAuthorizedAddon) {
+ return this.addonsService.deleteAuthorizedAddon(action.payload, action.addonType).pipe(
+ switchMap(() => {
+ const referenceId = ctx.getState().addonsUserReference[0].id;
+ return action.addonType === 'storage'
+ ? ctx.dispatch(new GetAuthorizedStorageAddons(referenceId))
+ : ctx.dispatch(new GetAuthorizedCitationAddons(referenceId));
+ })
+ );
}
}
diff --git a/src/app/features/settings/addons/utils/addon-terms.const.ts b/src/app/features/settings/addons/utils/addon-terms.const.ts
index df1b9139e..ac16a705f 100644
--- a/src/app/features/settings/addons/utils/addon-terms.const.ts
+++ b/src/app/features/settings/addons/utils/addon-terms.const.ts
@@ -45,8 +45,7 @@ export const ADDON_TERMS: Term[] = [
supportedFeature: 'LOGS',
storage: {
true: 'OSF tracks changes you make to your {provider} content within OSF, but not changes made directly within {provider}.',
- false:
- 'OSF does not keep track of changes made using {provider} directly.',
+ false: 'OSF does not keep track of changes made using {provider} directly.',
},
},
{
@@ -77,8 +76,7 @@ export const ADDON_TERMS: Term[] = [
supportedFeature: 'FILE_VERSIONS',
storage: {
true: '{provider} files and their versions can be viewed/downloaded in OSF.',
- false:
- '{provider} files can be viewed/downloaded in OSF, but version history is not supported.',
+ false: '{provider} files can be viewed/downloaded in OSF, but version history is not supported.',
},
},
];
diff --git a/src/app/features/settings/developer-apps/developer-app-add-edit-form/developer-app-add-edit-form.component.html b/src/app/features/settings/developer-apps/developer-app-add-edit-form/developer-app-add-edit-form.component.html
index 01855c30c..cb939f07e 100644
--- a/src/app/features/settings/developer-apps/developer-app-add-edit-form/developer-app-add-edit-form.component.html
+++ b/src/app/features/settings/developer-apps/developer-app-add-edit-form/developer-app-add-edit-form.component.html
@@ -1,11 +1,7 @@
-
- {{ "settings.addons.connectAddon.setupNewAccount" | translate }} + {{ 'settings.addons.connectAddon.setupNewAccount' | translate }}
- {{ "settings.addons.connectAddon.oauthDescription" | translate }} + {{ 'settings.addons.connectAddon.oauthDescription' | translate }}
- - {{ "settings.addons.connectAddon.startOauth" | translate }} + + {{ 'settings.addons.connectAddon.startOauth' | translate }}