Feature: Owners show or hide their profile
Description
The Profile editing view offers the owner of a profile the switch
Show my profile publicly in its header, next to the
synchronization checkbox. It writes the hidden field of the profile, the
one the backend shows as Visible, so a profile its owner switched
off is left out of every public list and its detail page answers with page not
found. The field is shared by every language of the profile, and the switch
hides or shows all of them, from whichever site language the owner uses. The
profile model of EXT:academic_persons exposes the field as
hidden.
An owner who switched a profile off still reaches it. The list of the editor shows it with a Not public mark and without the View link, and the owner opens it, edits it, image included, and switches it on again. Start time, end time and frontend user groups of a profile keep applying.
The switch is the special field hidden of
Configuration/ and is on by default. An
installation that leaves visibility to its editors takes it away there:
special:
hidden:
validators:
- readonly
readonly and disabled render the switch disabled, hidden: ~ removes
it, and a profile an editor hid then stays hidden. Backend editors keep the
checkbox either way.
A directory for logged-in visitors that lists every profile, including those that are not public, uses the existing option Show hidden records of the list and detail elements of EXT:academic_persons. That directory cannot tell a profile its owner switched off from one an editor hid.
Impact
Owners of an existing installation get the switch with the update, and they can show a profile an editor hid before. Take the switch away as shown above where that must not happen.
Owners now also see their hidden profiles in the editor. Before, a hidden
profile was missing from the list, and opening it was refused. The
{profiles} variable of the list template is a plain array now instead of
a query result, so an override that reads {profiles. or calls a
method of the query result on it has to change. {profiles -> f:
and f: keep working.
The image metadata of a hidden profile is now written like that of any other, on a backend save as well. Before, a backend save left it out.
An installation that recorded the consent of the owner in a field of its own
moves it into hidden once, with an upgrade wizard of its site package:
- Set
hidden = 1on every profile without consent, on the default-language record and on each of its translations. Leave profiles that are hidden already as they are. - Let an import that creates profiles set
hidden = 1on a new profile where it created it without consent before. - Remove the field, and every query condition, template condition and plugin option that read it.
A site overriding Templates/ carries
data- and passes visibility: special to the
header partial, and one overriding Partials/ renders
the switch itself.
Affected Installations
Installations of the Profile editing content element of
EXT:.