Allow the fine-grained configuration of notification settings for
each section and reword the help texts quite a bit. This will later be used to collect the correct set of email addresses to notify a particular audience about changes in a particular section. Notice that a project admin will have to explicitely opt-in for "Others" notifications, i.e. unless the checkbox is checked, existing email addresses won't be notified anymore. This is surely debatable for existing setups, but makes much more sense for new setups. Eventually we'll write a small migration script to add the specific enabled setting for those (existing) projects that have a non-empty mail list configured. This commit has been sponsored by SciLab.
This commit is contained in:
@@ -508,21 +508,24 @@ class IDF_Views_Project
|
||||
}
|
||||
}
|
||||
$form->save(); // Save the authorized users.
|
||||
$request->user->setMessage(__('The project tabs access rights have been saved.'));
|
||||
$request->user->setMessage(__('The project tabs access rights and notification settings have been saved.'));
|
||||
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Project::adminTabs',
|
||||
array($prj->shortname));
|
||||
return new Pluf_HTTP_Response_Redirect($url);
|
||||
}
|
||||
} else {
|
||||
$params = array();
|
||||
$keys = array('downloads_access_rights', 'source_access_rights',
|
||||
'issues_access_rights', 'review_access_rights',
|
||||
'wiki_access_rights',
|
||||
'downloads_notification_email',
|
||||
'review_notification_email',
|
||||
'wiki_notification_email',
|
||||
'source_notification_email',
|
||||
'issues_notification_email');
|
||||
$sections = array('downloads', 'wiki', 'source', 'issues', 'review');
|
||||
$keys = array();
|
||||
|
||||
foreach ($sections as $section) {
|
||||
$keys[] = $section.'_access_rights';
|
||||
$keys[] = $section.'_notification_owners_enabled';
|
||||
$keys[] = $section.'_notification_members_enabled';
|
||||
$keys[] = $section.'_notification_email_enabled';
|
||||
$keys[] = $section.'_notification_email';
|
||||
}
|
||||
|
||||
foreach ($keys as $key) {
|
||||
$_val = $request->conf->getVal($key, false);
|
||||
if ($_val !== false) {
|
||||
|
Reference in New Issue
Block a user