1.1 --- a/README.txt Tue Sep 15 00:28:09 2015 +0200
1.2 +++ b/README.txt Thu Sep 17 18:08:40 2015 +0200
1.3 @@ -238,6 +238,33 @@
1.4 Where frequency-specific directories are not supported by cron on a system, a
1.5 crontab entry of the appropriate format is required instead.
1.6
1.7 +Configuring Web Servers for Free/Busy Publishing
1.8 +------------------------------------------------
1.9 +
1.10 +Each user may request the publishing of their free/busy information by
1.11 +configuring certain settings. The conf/apache/imip-agent.conf file provides a
1.12 +configuration file for deployment with the Apache Web server software that
1.13 +exposes a directory for Web publishing containing the published free/busy
1.14 +information.
1.15 +
1.16 +Access to free/busy information may not be moderated, but Web server
1.17 +directives can be introduced to impose access controls. Mail programs that
1.18 +wish to consult the free/busy information may have problems in dealing with
1.19 +authentication mechanisms, however, and it may be regarded as acceptable in
1.20 +certain environments to expose such information publicly or with
1.21 +network-specific access constraints.
1.22 +
1.23 +Configuring Web Servers for the Calendar Management Interface
1.24 +-------------------------------------------------------------
1.25 +
1.26 +A calendar management interface is provided to allow users to view and
1.27 +interact with their calendars through the Web. The
1.28 +conf/apache/imip-manager.conf file provides a configuration file for
1.29 +deployment with the Apache Web server software that enables this interface.
1.30 +
1.31 +Since such access to calendars should only be performed by identified
1.32 +users, access controls are suggested in the configuration file.
1.33 +
1.34 Prerequisites
1.35 =============
1.36
2.1 --- a/conf/apache/imip-agent.conf Tue Sep 15 00:28:09 2015 +0200
2.2 +++ b/conf/apache/imip-agent.conf Thu Sep 17 18:08:40 2015 +0200
2.3 @@ -1,11 +1,11 @@
2.4 Alias /freebusy /var/www/imip-agent/static/
2.5 -Alias /imip-manager/styles.css /var/www/imip-agent/styles.css
2.6 -ScriptAlias /imip-manager /var/www/imip-agent/imip_manager.py
2.7 +
2.8 +# Enable this directive to protect published free/busy information.
2.9
2.10 -<Location "/imip-manager">
2.11 - AuthType basic
2.12 - AuthName "imip-manager"
2.13 - AuthBasicProvider ldap
2.14 - AuthLDAPUrl "ldap://localhost/ou=People,dc=example,dc=com?mail?sub"
2.15 - Require valid-user
2.16 -</Location>
2.17 +#<Location "/freebusy">
2.18 +# AuthType basic
2.19 +# AuthName "imip-agent"
2.20 +# AuthBasicProvider ldap
2.21 +# AuthLDAPUrl "ldap://localhost/ou=People,dc=example,dc=com?mail?sub"
2.22 +# Require valid-user
2.23 +#</Location>
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/conf/apache/imip-manager.conf Thu Sep 17 18:08:40 2015 +0200
3.3 @@ -0,0 +1,21 @@
3.4 +Alias /imip-manager/styles.css /var/www/imip-agent/styles.css
3.5 +ScriptAlias /imip-manager /var/www/imip-agent/imip_manager.py
3.6 +
3.7 +<Location "/imip-manager">
3.8 + AuthType basic
3.9 + AuthName "imip-manager"
3.10 +
3.11 + # Choose one of the sections below.
3.12 +
3.13 + # LDAP authentication...
3.14 + AuthBasicProvider ldap
3.15 + AuthLDAPUrl "ldap://localhost/ou=People,dc=example,dc=com?mail?sub"
3.16 +
3.17 + # Simple file-based authentication...
3.18 + #AuthUserFile /var/www/imip-agent/users
3.19 +
3.20 + # Access policy. Where users and groups are involved, specific users or
3.21 + # groups can be required here.
3.22 +
3.23 + Require valid-user
3.24 +</Location>
4.1 --- a/docs/preferences.txt Tue Sep 15 00:28:09 2015 +0200
4.2 +++ b/docs/preferences.txt Thu Sep 17 18:08:40 2015 +0200
4.3 @@ -49,7 +49,8 @@
4.4 Alternative: always
4.5
4.6 Indicate whether to bundle free/busy details with other payloads such as
4.7 -event and free/busy objects.
4.8 +event and free/busy objects. The freebusy_sharing setting must be configured
4.9 +for bundling to operate.
4.10
4.11 freebusy_messages
4.12 -----------------
4.13 @@ -79,6 +80,15 @@
4.14 600 extend scheduling offers for 10 minutes
4.15 1d extend offers for 1 day
4.16
4.17 +freebusy_publishing
4.18 +-------------------
4.19 +
4.20 +Default: no
4.21 +Alternative: publish
4.22 +
4.23 +Indicate whether to publish free/busy details as Web resources. The
4.24 +freebusy_sharing setting must be configured for publishing to operate.
4.25 +
4.26 freebusy_sharing
4.27 ----------------
4.28
4.29 @@ -89,7 +99,8 @@
4.30
4.31 * bundling in e-mail messages if bundling is configured
4.32 * responding to free/busy requests via e-mail
4.33 - * publishing as Web resources if a static Web resource is configured
4.34 + * publishing as Web resources if a static Web resource is configured and if
4.35 + publishing is configured
4.36
4.37 incoming
4.38 --------
5.1 --- a/imiptools/client.py Tue Sep 15 00:28:09 2015 +0200
5.2 +++ b/imiptools/client.py Thu Sep 17 18:08:40 2015 +0200
5.3 @@ -89,22 +89,44 @@
5.4 return get_window_end(self.get_tzid(), self.get_window_size())
5.5
5.6 def is_participating(self):
5.7 +
5.8 + "Return participation in the calendar system."
5.9 +
5.10 prefs = self.get_preferences()
5.11 return prefs and prefs.get("participating", "participate") != "no" or False
5.12
5.13 def is_sharing(self):
5.14 +
5.15 + "Return whether free/busy information is being generally shared."
5.16 +
5.17 prefs = self.get_preferences()
5.18 return prefs and prefs.get("freebusy_sharing") == "share" or False
5.19
5.20 def is_bundling(self):
5.21 +
5.22 + "Return whether free/busy information is being bundled in messages."
5.23 +
5.24 prefs = self.get_preferences()
5.25 return prefs and prefs.get("freebusy_bundling") == "always" or False
5.26
5.27 def is_notifying(self):
5.28 +
5.29 + "Return whether recipients are notified about free/busy payloads."
5.30 +
5.31 prefs = self.get_preferences()
5.32 return prefs and prefs.get("freebusy_messages") == "notify" or False
5.33
5.34 + def is_publishing(self):
5.35 +
5.36 + "Return whether free/busy information is being published as Web resources."
5.37 +
5.38 + prefs = self.get_preferences()
5.39 + return prefs and prefs.get("freebusy_publishing") == "publish" or False
5.40 +
5.41 def is_refreshing(self):
5.42 +
5.43 + "Return whether a recipient supports requests to refresh event details."
5.44 +
5.45 prefs = self.get_preferences()
5.46 return prefs and prefs.get("event_refreshing") == "always" or False
5.47
6.1 --- a/imiptools/handlers/common.py Tue Sep 15 00:28:09 2015 +0200
6.2 +++ b/imiptools/handlers/common.py Thu Sep 17 18:08:40 2015 +0200
6.3 @@ -129,7 +129,7 @@
6.4 self.remove_freebusy_for_recurrences(freebusy, self.store.get_recurrences(self.user, self.uid))
6.5 self.store.set_freebusy(self.user, freebusy)
6.6
6.7 - if self.publisher and self.is_sharing():
6.8 + if self.publisher and self.is_sharing() and self.is_publishing():
6.9 self.publisher.set_freebusy(self.user, freebusy)
6.10
6.11 # Update free/busy provider information if the event may recur
6.12 @@ -150,7 +150,7 @@
6.13 self.remove_freebusy_for_recurrences(freebusy)
6.14 self.store.set_freebusy(self.user, freebusy)
6.15
6.16 - if self.publisher and self.is_sharing():
6.17 + if self.publisher and self.is_sharing() and self.is_publishing():
6.18 self.publisher.set_freebusy(self.user, freebusy)
6.19
6.20 # Update free/busy provider information if the event may recur
7.1 --- a/imipweb/resource.py Tue Sep 15 00:28:09 2015 +0200
7.2 +++ b/imipweb/resource.py Thu Sep 17 18:08:40 2015 +0200
7.3 @@ -225,7 +225,7 @@
7.4
7.5 "Publish the details if configured to share them."
7.6
7.7 - if self.publisher and self.is_sharing():
7.8 + if self.publisher and self.is_sharing() and self.is_publishing():
7.9 self.publisher.set_freebusy(self.user, freebusy)
7.10
7.11 # vim: tabstop=4 expandtab shiftwidth=4
8.1 --- a/tools/make_freebusy.py Tue Sep 15 00:28:09 2015 +0200
8.2 +++ b/tools/make_freebusy.py Thu Sep 17 18:08:40 2015 +0200
8.3 @@ -22,6 +22,7 @@
8.4 """
8.5
8.6 from codecs import getwriter
8.7 +from imiptools.client import Client
8.8 from imiptools.data import get_window_end, Object
8.9 from imiptools.dates import get_default_timezone, to_utc_datetime
8.10 from imiptools.period import insert_period
8.11 @@ -107,7 +108,9 @@
8.12 if store_and_publish:
8.13 if user == participant:
8.14 store.set_freebusy(user, fb)
8.15 - publisher.set_freebusy(user, fb)
8.16 +
8.17 + if Client(user).is_sharing() and Client(user).is_publishing():
8.18 + publisher.set_freebusy(user, fb)
8.19
8.20 # Update the list of objects providing periods on future occasions.
8.21