Commit f820ea6c authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Create all profiles with logged-in access by default (bug #807278)



There is currently only a site-wide setting for logged-in profile view
access.  This means that when two institutions share a site, and one
wants open profiles and another only wants institution-visible profiles,
new users in the open-profile institution must be asked to manually add
logged-in access on their profile.  Because we expect many more
open-profile institutions than closed-profile institutions on a site, it
makes more sense to put the onus on the closed-profile institutions to
ensure their members remove logged-in access manually.

This change ensures logged-in access is added to all new profiles, but
only locks that access when the loggedinprofileviewaccess setting is on.

Change-Id: I3375d7b2f8eb635a11879bf7758267f48f74c508
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent dcd359a8
......@@ -181,6 +181,7 @@ $siteoptionform = array(
'description' => get_string('loggedinprofileviewaccessdescription', 'admin'),
'defaultvalue' => get_config('loggedinprofileviewaccess'),
'disabled' => in_array('loggedinprofileviewaccess', $OVERRIDDEN),
'help' => true,
),
),
),
......
......@@ -539,14 +539,13 @@ class User {
$view->addblockinstance($aboutme);
// Set view access
$access = array();
if (get_config('loggedinprofileviewaccess')) {
$access[] = array(
$access = array(
array(
'type' => 'loggedin',
'startdate' => null,
'stopdate' => null,
);
}
),
);
if ($institutions = $this->get('institutions')) {
foreach ($institutions as $i) {
$access[] = array(
......
......@@ -240,7 +240,7 @@ $string['allowpublicprofiles'] = 'Allow public profiles';
$string['allowpublicprofilesdescription'] = 'If set to yes, users will be able to set their profile pages to be accessible to the public rather than only to logged in users';
$string['anonymouscomments'] = 'Anonymous Comments';
$string['anonymouscommentsdescription'] = 'If checked, logged-out users can leave comments on public pages or pages they can access by secret URL.';
$string['loggedinprofileviewaccess'] = 'Logged-in profile view access';
$string['loggedinprofileviewaccess'] = 'Logged-in profile access';
$string['loggedinprofileviewaccessdescription'] = 'If checked, a user\'s profile page will be viewable by all logged-in users.';
$string['antispam'] = 'Anti-spam';
$string['antispamdescription'] = 'The type of anti-spam measures used on publicly visible forms';
......
<h3>Logged-in profile access</h3>
<p>Enable this option if you want to make sure all users can see each
others' profile pages.</p>
<p>If this option is unchecked, profile pages are initially viewable
by all logged-in users, but the owner is allowed to restrict access to
a smaller group if they wish.</p>
<p>Profiles of institution members will always be visible to other
members of the same institution.</p>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment