Start assigning permissions to the hooks.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 15 Aug 2010 16:15:44 +0000 (18:15 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 22 Aug 2010 16:07:31 +0000 (18:07 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
modules/carnet.php
modules/search.php

index 276fabf..2125cf9 100644 (file)
@@ -24,18 +24,18 @@ class CarnetModule extends PLModule
     function handlers()
     {
         return array(
-            'carnet'                => $this->make_hook('index',    AUTH_COOKIE),
-            'carnet/panel'          => $this->make_hook('panel',    AUTH_COOKIE),
-            'carnet/notifs'         => $this->make_hook('notifs',   AUTH_COOKIE),
-
-            'carnet/contacts'       => $this->make_hook('contacts', AUTH_COOKIE),
-            'carnet/contacts/pdf'   => $this->make_hook('pdf',      AUTH_COOKIE),
-            'carnet/contacts/vcard' => $this->make_hook('vcard',    AUTH_COOKIE),
-            'carnet/contacts/ical'  => $this->make_hook('ical',     AUTH_PUBLIC, 'user', NO_HTTPS),
-            'carnet/contacts/csv'   => $this->make_hook('csv',     AUTH_PUBLIC, 'user', NO_HTTPS),
-            'carnet/contacts/csv/birthday'  => $this->make_hook('csv_birthday',     AUTH_PUBLIC, 'user', NO_HTTPS),
-
-            'carnet/rss'            => $this->make_hook('rss',      AUTH_PUBLIC, 'user', NO_HTTPS),
+            'carnet'                => $this->make_hook('index',    AUTH_COOKIE, 'directory_private'),
+            'carnet/panel'          => $this->make_hook('panel',    AUTH_COOKIE, 'directory_private'),
+            'carnet/notifs'         => $this->make_hook('notifs',   AUTH_COOKIE, 'directory_private'),
+
+            'carnet/contacts'       => $this->make_hook('contacts', AUTH_COOKIE, 'directory_private'),
+            'carnet/contacts/pdf'   => $this->make_hook('pdf',      AUTH_COOKIE, 'directory_private'),
+            'carnet/contacts/vcard' => $this->make_hook('vcard',    AUTH_COOKIE, 'directory_private'),
+            'carnet/contacts/ical'  => $this->make_hook('ical',     AUTH_PUBLIC, 'directory_private', NO_HTTPS),
+            'carnet/contacts/csv'   => $this->make_hook('csv',     AUTH_PUBLIC,  'directory_private', NO_HTTPS),
+            'carnet/contacts/csv/birthday'  => $this->make_hook('csv_birthday',     AUTH_PUBLIC, 'directory_private', NO_HTTPS),
+
+            'carnet/rss'            => $this->make_hook('rss',      AUTH_PUBLIC, 'directory_private', NO_HTTPS),
         );
     }
 
index 72a09ac..67b4ba3 100644 (file)
@@ -25,10 +25,10 @@ class SearchModule extends PLModule
     {
         return array(
             'search'              => $this->make_hook('quick',          AUTH_PUBLIC),
-            'search/adv'          => $this->make_hook('advanced',       AUTH_COOKIE),
+            'search/adv'          => $this->make_hook('advanced',       AUTH_COOKIE, 'directory_ax'),
             'advanced_search.php' => $this->make_hook('redir_advanced', AUTH_PUBLIC),
-            'search/autocomplete' => $this->make_hook('autocomplete',   AUTH_COOKIE, 'user', NO_AUTH),
-            'search/list'         => $this->make_hook('list',           AUTH_COOKIE, 'user', NO_AUTH),
+            'search/autocomplete' => $this->make_hook('autocomplete',   AUTH_COOKIE, 'directory_ax', NO_AUTH),
+            'search/list'         => $this->make_hook('list',           AUTH_COOKIE, 'directory_ax', NO_AUTH),
         );
     }