+
+
+
diff --git a/cypress/e2e/settings/personal-info.cy.ts b/cypress/e2e/settings/personal-info.cy.ts
index 940e3cd6449..80d2c87fe40 100644
--- a/cypress/e2e/settings/personal-info.cy.ts
+++ b/cypress/e2e/settings/personal-info.cy.ts
@@ -98,13 +98,19 @@ const checkSettingsVisibility = (property: string, defaultVisibility: Visibility
}) */
}
-const genericProperties = ['Location', 'X (formerly Twitter)', 'Fediverse']
+const genericProperties = [
+ ['Location', 'Berlin'],
+ ['X (formerly Twitter)', 'nextclouders'],
+ ['Fediverse', 'nextcloud@mastodon.xyz'],
+]
const nonfederatedProperties = ['Organisation', 'Role', 'Headline', 'About']
describe('Settings: Change personal information', { testIsolation: true }, () => {
let snapshot: string = ''
before(() => {
+ // make sure the fediverse check does not do http requests
+ cy.runOccCommand('config:system:set has_internet_connection --value false')
// ensure we can set locale and language
cy.runOccCommand('config:system:delete force_language')
cy.runOccCommand('config:system:delete force_locale')
@@ -125,6 +131,8 @@ describe('Settings: Change personal information', { testIsolation: true }, () =>
})
after(() => {
+ cy.runOccCommand('config:system:delete has_internet_connection')
+
cy.runOccCommand('config:system:set force_language --value en')
cy.runOccCommand('config:system:set force_locale --value en_US')
})
@@ -349,22 +357,21 @@ describe('Settings: Change personal information', { testIsolation: true }, () =>
})
// Check generic properties that allow any visibility and any value
- genericProperties.forEach((property) => {
+ genericProperties.forEach(([property, value]) => {
it(`Can set ${property} and change its visibility`, () => {
- const uniqueValue = `${property.toUpperCase()} ${property.toLowerCase()}`
cy.contains('label', property).scrollIntoView()
- inputForLabel(property).type(uniqueValue)
+ inputForLabel(property).type(value)
handlePasswordConfirmation(user.password)
cy.wait('@submitSetting')
cy.reload()
- inputForLabel(property).should('have.value', uniqueValue)
+ inputForLabel(property).should('have.value', value)
checkSettingsVisibility(property)
// check it is visible on the profile
cy.visit(`/u/${user.userId}`)
- cy.contains(uniqueValue).should('be.visible')
+ cy.contains(value).should('be.visible')
})
})
diff --git a/dist/settings-vue-settings-admin-basic-settings.js b/dist/settings-vue-settings-admin-basic-settings.js
index c4971a084e4..050309d6c6f 100644
--- a/dist/settings-vue-settings-admin-basic-settings.js
+++ b/dist/settings-vue-settings-admin-basic-settings.js
@@ -1,2 +1,2 @@
-(()=>{"use strict";var e,o,n,a={9165:(e,t,o)=>{o.d(t,{NZC:()=>r,ZL5:()=>l,fEr:()=>s,kHm:()=>i,n7C:()=>n,vrq:()=>a,zY6:()=>c});var n="M12,5.5A3.5,3.5 0 0,1 15.5,9A3.5,3.5 0 0,1 12,12.5A3.5,3.5 0 0,1 8.5,9A3.5,3.5 0 0,1 12,5.5M5,8C5.56,8 6.08,8.15 6.53,8.42C6.38,9.85 6.8,11.27 7.66,12.38C7.16,13.34 6.16,14 5,14A3,3 0 0,1 2,11A3,3 0 0,1 5,8M19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14C17.84,14 16.84,13.34 16.34,12.38C17.2,11.27 17.62,9.85 17.47,8.42C17.92,8.15 18.44,8 19,8M5.5,18.25C5.5,16.18 8.41,14.5 12,14.5C15.59,14.5 18.5,16.18 18.5,18.25V20H5.5V18.25M0,20V18.5C0,17.11 1.89,15.94 4.45,15.6C3.86,16.28 3.5,17.22 3.5,18.25V20H0M24,20H20.5V18.25C20.5,17.22 20.14,16.28 19.55,15.6C22.11,15.94 24,17.11 24,18.5V20Z",a="M17,19H7V5H17M17,1H7C5.89,1 5,1.89 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3C19,1.89 18.1,1 17,1Z",r="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z",s="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",i="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z",l="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z",c="M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},96156:(e,o,n)=>{var a=n(85471),r=n(21777),s=n(32981),i=n(53334);const l=(0,n(35947).YK)().setApp("settings").detectUser().build();var c=n(85168),d=n(65043),A=n(63814),u=n(56760);n(51257);var E=n(9165);const g=Object.freeze({ADDRESS:"address",AVATAR:"avatar",BIOGRAPHY:"biography",BIRTHDATE:"birthdate",DISPLAYNAME:"displayname",EMAIL_COLLECTION:"additional_mail",EMAIL:"email",FEDIVERSE:"fediverse",HEADLINE:"headline",NOTIFICATION_EMAIL:"notify_email",ORGANISATION:"organisation",PHONE:"phone",PROFILE_ENABLED:"profile_enabled",PRONOUNS:"pronouns",ROLE:"role",TWITTER:"twitter",WEBSITE:"website"}),p=Object.freeze({ADDRESS:(0,i.Tl)("settings","Location"),AVATAR:(0,i.Tl)("settings","Profile picture"),BIOGRAPHY:(0,i.Tl)("settings","About"),BIRTHDATE:(0,i.Tl)("settings","Date of birth"),DISPLAYNAME:(0,i.Tl)("settings","Full name"),EMAIL_COLLECTION:(0,i.Tl)("settings","Additional email"),EMAIL:(0,i.Tl)("settings","Email"),FEDIVERSE:(0,i.Tl)("settings","Fediverse (e.g. Mastodon)"),HEADLINE:(0,i.Tl)("settings","Headline"),ORGANISATION:(0,i.Tl)("settings","Organisation"),PHONE:(0,i.Tl)("settings","Phone number"),PROFILE_ENABLED:(0,i.Tl)("settings","Profile"),PRONOUNS:(0,i.Tl)("settings","Pronouns"),ROLE:(0,i.Tl)("settings","Role"),TWITTER:(0,i.Tl)("settings","X (formerly Twitter)"),WEBSITE:(0,i.Tl)("settings","Website")}),b=(Object.freeze({[g.ADDRESS]:p.ADDRESS,[g.AVATAR]:p.AVATAR,[g.BIOGRAPHY]:p.BIOGRAPHY,[g.DISPLAYNAME]:p.DISPLAYNAME,[g.EMAIL_COLLECTION]:p.EMAIL_COLLECTION,[g.EMAIL]:p.EMAIL,[g.HEADLINE]:p.HEADLINE,[g.ORGANISATION]:p.ORGANISATION,[g.PHONE]:p.PHONE,[g.PROFILE_ENABLED]:p.PROFILE_ENABLED,[g.ROLE]:p.ROLE,[g.TWITTER]:p.TWITTER,[g.FEDIVERSE]:p.FEDIVERSE,[g.WEBSITE]:p.WEBSITE,[g.BIRTHDATE]:p.BIRTHDATE,[g.PRONOUNS]:p.PRONOUNS}),Object.freeze({PROFILE_VISIBILITY:(0,i.Tl)("settings","Profile visibility")}),Object.freeze({[p.ADDRESS]:g.ADDRESS,[p.AVATAR]:g.AVATAR,[p.BIOGRAPHY]:g.BIOGRAPHY,[p.DISPLAYNAME]:g.DISPLAYNAME,[p.EMAIL_COLLECTION]:g.EMAIL_COLLECTION,[p.EMAIL]:g.EMAIL,[p.HEADLINE]:g.HEADLINE,[p.ORGANISATION]:g.ORGANISATION,[p.PHONE]:g.PHONE,[p.PROFILE_ENABLED]:g.PROFILE_ENABLED,[p.ROLE]:g.ROLE,[p.TWITTER]:g.TWITTER,[p.FEDIVERSE]:g.FEDIVERSE,[p.WEBSITE]:g.WEBSITE,[p.BIRTHDATE]:g.BIRTHDATE,[p.PRONOUNS]:g.PRONOUNS}),Object.freeze({LANGUAGE:"language",LOCALE:"locale",FIRST_DAY_OF_WEEK:"first_day_of_week"}),Object.freeze({LANGUAGE:(0,i.Tl)("settings","Language"),LOCALE:(0,i.Tl)("settings","Locale"),FIRST_DAY_OF_WEEK:(0,i.Tl)("settings","First day of week")}),Object.freeze({PRIVATE:"v2-private",LOCAL:"v2-local",FEDERATED:"v2-federated",PUBLISHED:"v2-published"}));Object.freeze({[p.ADDRESS]:[b.LOCAL,b.PRIVATE],[p.AVATAR]:[b.LOCAL,b.PRIVATE],[p.BIOGRAPHY]:[b.LOCAL,b.PRIVATE],[p.DISPLAYNAME]:[b.LOCAL],[p.EMAIL_COLLECTION]:[b.LOCAL],[p.EMAIL]:[b.LOCAL],[p.HEADLINE]:[b.LOCAL,b.PRIVATE],[p.ORGANISATION]:[b.LOCAL,b.PRIVATE],[p.PHONE]:[b.LOCAL,b.PRIVATE],[p.PROFILE_ENABLED]:[b.LOCAL,b.PRIVATE],[p.ROLE]:[b.LOCAL,b.PRIVATE],[p.TWITTER]:[b.LOCAL,b.PRIVATE],[p.FEDIVERSE]:[b.LOCAL,b.PRIVATE],[p.WEBSITE]:[b.LOCAL,b.PRIVATE],[p.BIRTHDATE]:[b.LOCAL,b.PRIVATE],[p.PRONOUNS]:[b.LOCAL,b.PRIVATE]}),Object.freeze([p.BIOGRAPHY,p.HEADLINE,p.ORGANISATION,p.ROLE,p.BIRTHDATE]),Object.freeze({[b.PRIVATE]:{name:b.PRIVATE,displayName:(0,i.Tl)("settings","Private"),tooltip:(0,i.Tl)("settings","Only visible to people matched via phone number integration through Talk on mobile"),tooltipDisabled:(0,i.Tl)("settings","Not available as this property is required for core functionality including file sharing and calendar invitations"),icon:E.vrq},[b.LOCAL]:{name:b.LOCAL,displayName:(0,i.Tl)("settings","Local"),tooltip:(0,i.Tl)("settings","Only visible to people on this instance and guests"),icon:E.kHm},[b.FEDERATED]:{name:b.FEDERATED,displayName:(0,i.Tl)("settings","Federated"),tooltip:(0,i.Tl)("settings","Only synchronize to trusted servers"),tooltipDisabled:(0,i.Tl)("settings","Not available as federation has been disabled for your account, contact your system administration if you have any questions"),icon:E.n7C},[b.PUBLISHED]:{name:b.PUBLISHED,displayName:(0,i.Tl)("settings","Published"),tooltip:(0,i.Tl)("settings","Synchronize to trusted servers and the global and public address book"),tooltipDisabled:(0,i.Tl)("settings","Not available as publishing account specific data to the lookup server is not allowed, contact your system administration if you have any questions"),icon:E.zY6}}),b.LOCAL,Object.freeze({NOT_VERIFIED:0,VERIFICATION_IN_PROGRESS:1,VERIFIED:2});var C=n(32073);const T=(0,s.C)("settings","profileEnabledByDefault",!0),h={name:"ProfileSettings",components:{NcCheckboxRadioSwitch:C.A},data:()=>({initialProfileEnabledByDefault:T}),methods:{async onProfileDefaultChange(e){"boolean"==typeof e&&await this.updateProfileDefault(e)},async updateProfileDefault(e){try{const t=await(async e=>{e=e?"1":"0";const t=(0,A.KT)("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"settings",key:"profile_enabled_by_default"});return await(0,u.C5)(),(await d.Ay.post(t,{value:e})).data})(e);this.handleResponse({isEnabled:e,status:t.ocs?.meta?.status})}catch(e){this.handleResponse({errorMessage:t("settings","Unable to update profile default setting"),error:e})}},handleResponse(e){let{isEnabled:t,status:o,errorMessage:n,error:a}=e;"ok"===o?this.initialProfileEnabledByDefault=t:((0,c.Qg)(n),l.error(n,a))}}};var I=n(14486);const L=(0,I.A)(h,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"section",attrs:{id:"profile-settings"}},[t("h2",{staticClass:"inlineblock"},[e._v("\n\t\t"+e._s(e.t("settings","Profile"))+"\n\t")]),e._v(" "),t("p",{staticClass:"settings-hint"},[e._v("\n\t\t"+e._s(e.t("settings","Enable or disable profile by default for new accounts."))+"\n\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.initialProfileEnabledByDefault},on:{"update:checked":[function(t){e.initialProfileEnabledByDefault=t},e.onProfileDefaultChange]}},[e._v("\n\t\t"+e._s(e.t("settings","Enable"))+"\n\t")])],1)}),[],!1,null,null,null).exports;var v=n(19231),m=n(88837),f=n(40083);const O=(0,s.C)("settings","lastCron"),R=(0,s.C)("settings","cronMaxAge",""),N=(0,s.C)("settings","backgroundJobsMode","cron"),y=(0,s.C)("settings","cliBasedCronPossible",!0),P=(0,s.C)("settings","cliBasedCronUser","www-data"),S=(0,s.C)("settings","backgroundJobsDocUrl"),D={name:"BackgroundJob",components:{NcCheckboxRadioSwitch:C.A,NcSettingsSection:m.A,NcNoteCard:f.A},data:()=>({lastCron:O,cronMaxAge:R,backgroundJobsMode:N,cliBasedCronPossible:y,cliBasedCronUser:P,backgroundJobsDocUrl:S,relativeTime:(0,v.A)(1e3*O).fromNow(),maxAgeRelativeTime:(0,v.A)(1e3*R).fromNow()}),computed:{cronLabel(){let e=t("settings","Use system cron service to call the cron.php file every 5 minutes.");return this.cliBasedCronPossible?e+="\n\t\t\t{{ t('settings', 'Enable or disable profile by default for new accounts.') }}\n\t\t
\n\n\t\t\n\t\t\t{{ t('settings', 'Enable or disable profile by default for new accounts.') }}\n\t\t
\n\n\t\t