From 76822e1f54f09bdd316836686a5ca274dde692f1 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Wed, 17 Aug 2011 00:31:01 +0200 Subject: [PATCH 1/8] Rename information files to *.rst, add README.rst in the MANIFEST --- MANIFEST.in | 2 +- NEWS => NEWS.rst | 0 README => README.rst | 0 TODO => TODO.rst | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename NEWS => NEWS.rst (100%) rename README => README.rst (100%) rename TODO => TODO.rst (100%) diff --git a/MANIFEST.in b/MANIFEST.in index b5fba3a..4d2e444 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include COPYING NEWS TODO config logging radicale.fcgi radicale.wsgi +include COPYING NEWS.rst TODO.rst README.rst config logging radicale.fcgi radicale.wsgi diff --git a/NEWS b/NEWS.rst similarity index 100% rename from NEWS rename to NEWS.rst diff --git a/README b/README.rst similarity index 100% rename from README rename to README.rst diff --git a/TODO b/TODO.rst similarity index 100% rename from TODO rename to TODO.rst From ab26d7f168f344cd5773be1a42220e31a002d950 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Wed, 17 Aug 2011 00:34:32 +0200 Subject: [PATCH 2/8] Change the titles in the *.rst files --- NEWS.rst | 10 +++------- README.rst | 10 +++------- TODO.rst | 10 +++------- 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/NEWS.rst b/NEWS.rst index e97ad96..1d2b2bd 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -1,10 +1,6 @@ -========================== - Radicale - CalDAV Server -========================== - ------- - NEWS ------- +====== + News +====== 0.6 - Sapling ============= diff --git a/README.rst b/README.rst index 2c8eef9..7bee78f 100644 --- a/README.rst +++ b/README.rst @@ -1,10 +1,6 @@ -========================== - Radicale - CalDAV Server -========================== - --------- - README --------- +========= + Read Me +========= The Radicale Project is a free and open-source CalDAV calendar server. diff --git a/TODO.rst b/TODO.rst index ad5c8c9..623438f 100644 --- a/TODO.rst +++ b/TODO.rst @@ -1,10 +1,6 @@ -========================== - Radicale - CalDAV Server -========================== - ------- - TODO ------- +============ + To-Do List +============ 0.7 === From 4c85e730b3b8e1cb64248192c8ad7bf1fbaea12c Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Fri, 19 Aug 2011 17:49:30 +0200 Subject: [PATCH 3/8] Ignore some pylint warnings --- .pylintrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.pylintrc b/.pylintrc index c9c3cb7..e2004f0 100644 --- a/.pylintrc +++ b/.pylintrc @@ -32,7 +32,10 @@ load-plugins= # Disable the message, report, category or checker with the given id(s). You # can either give multiple identifier separated by comma (,) or put this option # multiple time. -disable=W0404 +# Remove warning removal warning +# Remove stupid warning on ** magic +# Remove stupid reimport warning +disable=I0011,W0142,W0404 [REPORTS] @@ -72,7 +75,7 @@ ignore-mixin-members=yes # List of classes names for which member attributes should not be checked # (useful for classes with attributes dynamically set). -ignored-classes=ParseResult +ignored-classes=ParseResult,radicale.config # When zope mode is activated, add a predefined set of Zope acquired attributes # to generated-members. From 51377098013bb562d478f24e965bbff2e71593fb Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Sun, 21 Aug 2011 14:59:43 +0200 Subject: [PATCH 4/8] Don't redirect good but unauthorized users (fixes #571) --- radicale/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/radicale/__init__.py b/radicale/__init__.py index d2a7f38..27a5588 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -219,17 +219,18 @@ class Application(object): last_allowed = False if calendars: + # Calendars found status, headers, answer = function( environ, calendars, content, user) - elif user and self.acl.has_right(user, user, password): - # Check if the user/password couple matches, - # redirect user to his principal home in this case + elif user and last_allowed: + # Good user and no calendars found, redirect user to home location = "/%s/" % str(quote(user)) log.LOGGER.info("redirecting to %s" % location) status = client.FOUND headers = {"Location": location} answer = "Redirecting to %s" % location else: + # Unknown or unauthorized user status = client.UNAUTHORIZED headers = { "WWW-Authenticate": From 5f26c131a9b0d07412e8bdd32a628e42887deb12 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Sun, 21 Aug 2011 16:30:59 +0200 Subject: [PATCH 5/8] Redirect authenticated users with no calendar found --- radicale/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radicale/__init__.py b/radicale/__init__.py index 27a5588..2233946 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -192,7 +192,7 @@ class Application(object): else: user = password = None - last_allowed = False + last_allowed = None calendars = [] for calendar in items: if not isinstance(calendar, ical.Calendar): @@ -222,7 +222,7 @@ class Application(object): # Calendars found status, headers, answer = function( environ, calendars, content, user) - elif user and last_allowed: + elif user and last_allowed is None: # Good user and no calendars found, redirect user to home location = "/%s/" % str(quote(user)) log.LOGGER.info("redirecting to %s" % location) From 4b87cb91814c344d5a33d4a663b8e47d3c5536e0 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Thu, 25 Aug 2011 14:28:37 +0200 Subject: [PATCH 6/8] Avoid the redirection loop (fixes #571) --- radicale/__init__.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/radicale/__init__.py b/radicale/__init__.py index 2233946..c226c31 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -223,12 +223,18 @@ class Application(object): status, headers, answer = function( environ, calendars, content, user) elif user and last_allowed is None: - # Good user and no calendars found, redirect user to home + # Good user and no calendars found location = "/%s/" % str(quote(user)) - log.LOGGER.info("redirecting to %s" % location) - status = client.FOUND - headers = {"Location": location} - answer = "Redirecting to %s" % location + if location == environ["PATH_INFO"]: + # We already have redirected the client + status, headers, answer = function( + environ, calendars, content, user) + else: + # Redirect the client + log.LOGGER.info("redirecting to %s" % location) + status = client.FOUND + headers = {"Location": location} + answer = "Redirecting to %s" % location else: # Unknown or unauthorized user status = client.UNAUTHORIZED From 5c66241346e95e7a6669b74b09865d62fb5c42a6 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Sat, 27 Aug 2011 13:29:38 +0200 Subject: [PATCH 7/8] 0.6.1 version --- NEWS.rst | 9 +++++++++ README | 4 ++++ radicale/__init__.py | 18 ++++++------------ 3 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 README diff --git a/NEWS.rst b/NEWS.rst index 1d2b2bd..bd1190e 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -2,6 +2,15 @@ News ====== +0.6.1 - Growing Up +================== + +* Example files included in the tarball +* htpasswd support fixed +* Redirection loop bug fixed +* Testing message on GET requests + + 0.6 - Sapling ============= diff --git a/README b/README new file mode 100644 index 0000000..8747d27 --- /dev/null +++ b/README @@ -0,0 +1,4 @@ +The Radicale Project is a free and open-source CalDAV calendar server. + +For complete documentation, please visit the Radicale online documentation +(http://www.radicale.org/documentation). diff --git a/radicale/__init__.py b/radicale/__init__.py index c226c31..7637937 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -49,7 +49,7 @@ except ImportError: from radicale import acl, config, ical, log, xmlutils -VERSION = "git" +VERSION = "0.6.1" class HTTPServer(wsgiref.simple_server.WSGIServer, object): @@ -223,18 +223,12 @@ class Application(object): status, headers, answer = function( environ, calendars, content, user) elif user and last_allowed is None: - # Good user and no calendars found + # Good user and no calendars found, redirect user to home location = "/%s/" % str(quote(user)) - if location == environ["PATH_INFO"]: - # We already have redirected the client - status, headers, answer = function( - environ, calendars, content, user) - else: - # Redirect the client - log.LOGGER.info("redirecting to %s" % location) - status = client.FOUND - headers = {"Location": location} - answer = "Redirecting to %s" % location + log.LOGGER.info("redirecting to %s" % location) + status = client.FOUND + headers = {"Location": location} + answer = "Redirecting to %s" % location else: # Unknown or unauthorized user status = client.UNAUTHORIZED From 7180a0948aad4c1ceab1e57aff9aa69fc7a9cf0c Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Sat, 27 Aug 2011 13:33:25 +0200 Subject: [PATCH 8/8] Set the version to "git", let's add some funky stuff into the 0.7 version! --- radicale/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radicale/__init__.py b/radicale/__init__.py index 7637937..2233946 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -49,7 +49,7 @@ except ImportError: from radicale import acl, config, ical, log, xmlutils -VERSION = "0.6.1" +VERSION = "git" class HTTPServer(wsgiref.simple_server.WSGIServer, object):