···768768saved_successfully = Your settings were saved successfully.
769769privacy = Privacy
770770keep_activity_private = Hide activity from profile page
771771-keep_activity_private_popup = Your activity will only be visible to you and the instance admins
771771+keep_activity_private.description = Your <a href="%s">public activity</a> will only be visible to you and the instance administrators.
772772773773lookup_avatar_by_mail = Lookup avatar by email address
774774federated_avatar_lookup = Federated avatar lookup
···820820email_preference_set_success = Email preference has been set successfully.
821821add_openid_success = The new OpenID address has been added.
822822keep_email_private = Hide email address
823823-keep_email_private_popup = This will hide your email address from your profile, as well as when you make a pull request or edit a file using the web interface. Pushed commits will not be modified. Use %s in commits to associate them with your account.
823823+keep_email_private_popup = This will hide your email address from your profile. It will no longer be the default for commits made via the web interface, like file uploads and edits, and will not be used for merge commits. Instead a special address %s can be used to associate commits with your account. Note that changing this option will not affect existing commits.
824824openid_desc = OpenID lets you delegate authentication to an external provider.
825825826826manage_ssh_keys = Manage SSH keys
+1
release-notes/9.0.0/4439.md
···11+Make descriptions of user privacy settings more visible and clear
···2424 // Activity availability should be the same for guest and another non-admin user, so this is not tested separately
2525 userGuest := emptyTestSession(t)
26262727- // The hint may contain "Configure" link with an anchor. Verify that it works.
2828- response := userRegular.MakeRequest(t, NewRequest(t, "GET", "/user/settings"), http.StatusOK)
2929- page := NewHTMLParser(t, response.Body)
3030- assert.True(t, page.Find(".checkbox#keep-activity-private").Length() > 0)
3131-3227 // = Public =
33283429 // Set activity visibility of user2 to public. This is the default, but won't hurt to set it before testing.
···41364237 // Verify the hint for all types of users: admin, self, guest
4338 testUser2ActivityVisibility(t, userAdmin, "This activity is visible to everyone, but as an administrator you can also see interactions in private spaces.", true)
4444- testUser2ActivityVisibility(t, userRegular, "Your activity is visible to everyone, except for interactions in private spaces. Configure.", true)
3939+ hintLink := testUser2ActivityVisibility(t, userRegular, "Your activity is visible to everyone, except for interactions in private spaces. Configure.", true)
4540 testUser2ActivityVisibility(t, userGuest, "", true)
46414242+ // When viewing own profile, the user is offered to configure activity visibility. Verify that the link is correct and works, also check that it links back to the activity tab.
4343+ linkCorrect := assert.EqualValues(t, "/user/settings#keep-activity-private", hintLink)
4444+ if linkCorrect {
4545+ page := NewHTMLParser(t, userRegular.MakeRequest(t, NewRequest(t, "GET", hintLink), http.StatusOK).Body)
4646+ activityLink, exists := page.Find(".field:has(.checkbox#keep-activity-private) .help a").Attr("href")
4747+ assert.True(t, exists)
4848+ assert.EqualValues(t, "/user2?tab=activity", activityLink)
4949+ }
5050+4751 // = Private =
48524953 // Set activity visibility of user2 to private
···56605761 // Verify the hint for all types of users: admin, self, guest
5862 testUser2ActivityVisibility(t, userAdmin, "This activity is visible to you because you're an administrator, but the user wants it to remain private.", true)
5959- testUser2ActivityVisibility(t, userRegular, "Your activity is only visible to you and the instance administrators. Configure.", true)
6363+ hintLink = testUser2ActivityVisibility(t, userRegular, "Your activity is only visible to you and the instance administrators. Configure.", true)
6064 testUser2ActivityVisibility(t, userGuest, "This user has disabled the public visibility of the activity.", false)
6565+6666+ // Verify that Configure link is correct
6767+ assert.EqualValues(t, "/user/settings#keep-activity-private", hintLink)
6168 })
6269}
6370···7279}
73807481// testUser2ActivityVisibility checks visibility of UI elements on /<user>?tab=activity
7575-func testUser2ActivityVisibility(t *testing.T, session *TestSession, hint string, availability bool) {
8282+// It also returns the account visibility link if it is present on the page.
8383+func testUser2ActivityVisibility(t *testing.T, session *TestSession, hint string, availability bool) string {
8484+ t.Helper()
7685 response := session.MakeRequest(t, NewRequest(t, "GET", "/user2?tab=activity"), http.StatusOK)
7786 page := NewHTMLParser(t, response.Body)
7887 // Check hint visibility and correctness
7988 testSelectorEquals(t, page, "#visibility-hint", hint)
8989+ hintLink, hintLinkExists := page.Find("#visibility-hint a").Attr("href")
80908191 // Check that the hint aligns with the actual feed availability
8292 assert.EqualValues(t, availability, page.Find("#activity-feed").Length() > 0)
···8797 // Check that the current tab is displayed and is active regardless of it's actual availability
8898 // For example, on /<user> it wouldn't be available to guest, but it should be still present on /<user>?tab=activity
8999 assert.True(t, page.Find("overflow-menu .active.item[href='/user2?tab=activity']").Length() > 0)
100100+101101+ if hintLinkExists {
102102+ return hintLink
103103+ }
104104+ return ""
90105}
911069292-// testUser2ActivityButtonsAvailability check visibility of Public activity tab on main profile page
107107+// testUser2ActivityButtonsAvailability checks visibility of Public activity tab on main profile page
93108func testUser2ActivityButtonsAvailability(t *testing.T, session *TestSession, buttons bool) {
109109+ t.Helper()
94110 response := session.MakeRequest(t, NewRequest(t, "GET", "/user2"), http.StatusOK)
95111 page := NewHTMLParser(t, response.Body)
96112 assert.EqualValues(t, buttons, page.Find("overflow-menu .item[href='/user2?tab=activity']").Length() > 0)