Commit 82731879 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

[feature] New parameter shared_feature in sympa.conf/robot.conf to...

[feature] New parameter shared_feature in sympa.conf/robot.conf to enable/disable the feature of shared document repository.
parent 517a5fa8
......@@ -62,7 +62,7 @@
[%~ END ~%]
[% END %]
[% IF is_listmaster || is_owner %]
[% IF is_shared_allowed && (is_listmaster || is_owner) %]
<form name="manage_shared_status" action="[% path_cgi %]" method="post">
<div>
[% IF shared == 'none' %]
......
......@@ -79,7 +79,7 @@
[% IF action == 'modindex' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
<li class="[% class %]"><a href="[% 'modindex' | url_rel([list]) %]">[%|loc%]Message[%END%] ([% mod_message %]) </a></li>
[% IF action == 'docindex' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
[% IF shared == 'exist' ~%]
[% IF is_shared_allowed && shared == 'exist' ~%]
<li class="[% class %]"><a href="[% 'docindex' | url_rel([list]) %]">[%|loc%]Document[%END%] ([% mod_total_shared %])</a></li>
[%~ END %]
[% END %]
......@@ -143,7 +143,7 @@
<li class="[% class %]"><a href="[% 'rss_request' | url_rel([list]) %]" >[%|loc%]RSS[%END%]</a></li>
[% END %]
[% IF shared == 'exist' %]
[% IF is_shared_allowed && shared == 'exist' %]
[% IF may_d_read %]
[% IF action == 'd_read' || action == 'd_edit' || action == 'd_properties' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
<li class="[% class %]"><a href="[% 'd_read' | url_rel([list,'']) %]" >[%|loc%]Shared documents[%END%]</a></li>
......
......@@ -3011,6 +3011,9 @@ sub check_param_out {
}
}
 
if (Conf::get_robot_conf($robot, 'shared_feature') eq 'on') {
$param->{'is_shared_allowed'} = 1;
# Shared documents access control.
my $shared_doc = Sympa::WWW::SharedDocument->new($list);
if ($shared_doc and $shared_doc->{status} eq 'exist') {
......@@ -3024,6 +3027,7 @@ sub check_param_out {
);
$param->{'shared_public_access'} = $access{'may'}{'read'};
}
}
 
# List included in other list may not be closed nor renamed.
$param->{'is_included'} = 1 if $list->is_included;
......
......@@ -1682,6 +1682,15 @@ our @params = (
# Shared document repository
{ 'name' => 'shared_feature',
'gettext_id' => 'Enable shared repository',
'gettext_comment' =>
'If set to "on", list owners can open shared repository.',
'vhost' => '1',
'edit' => '1',
'default' => 'on',
},
{ 'name' => 'default_shared_quota',
'optional' => '1',
'gettext_id' => 'Default disk quota for shared repository',
......
Supports Markdown
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