Don't use the implicit perms='user' arg for make_*hook.
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Sun, 17 Jul 2011 17:53:46 +0000 (19:53 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Mon, 18 Jul 2011 21:22:33 +0000 (23:22 +0200)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
24 files changed:
modules/api.php
modules/auth.php
modules/axletter.php
modules/deltaten.php
modules/email.php
modules/epletter.php
modules/events.php
modules/geoloc.php
modules/lists.php
modules/marketing.php
modules/newsletter.php
modules/openid.php
modules/payment.php
modules/platal.php
modules/profile.php
modules/reminder.php
modules/search.php
modules/stats.php
modules/survey.php
modules/xnet.php
modules/xnetevents.php
modules/xnetgrp.php
modules/xnetlists.php
modules/xnetnl.php

index edbc2cd..11630cc 100644 (file)
@@ -27,7 +27,7 @@ class ApiModule extends PlModule
             // TODO(vzanotti): Extend the plat/al engine to support placeholders
             // in handler urls, for instance "api/1/user/%forlife/isRegistered".
             'api/1/user'   => $this->make_api_hook('user',   AUTH_COOKIE, 'api_user_readonly'),
-            'api/1/search' => $this->make_api_hook('search', AUTH_COOKIE),
+            'api/1/search' => $this->make_api_hook('search', AUTH_COOKIE, 'user'),
         );
     }
 
index f302f1b..73d9760 100644 (file)
@@ -29,9 +29,9 @@ class AuthModule extends PLModule
 
             'webservices/manageurs.php'     => $this->make_hook('manageurs',          AUTH_PUBLIC, 'user', NO_HTTPS),
 
-            'auth-redirect.php'             => $this->make_hook('redirect',           AUTH_COOKIE),
-            'auth-groupex.php'              => $this->make_hook('groupex_old',        AUTH_COOKIE),
-            'auth-groupex'                  => $this->make_hook('groupex',            AUTH_COOKIE),
+            'auth-redirect.php'             => $this->make_hook('redirect',           AUTH_COOKIE, 'user'),
+            'auth-groupex.php'              => $this->make_hook('groupex_old',        AUTH_COOKIE, 'user'),
+            'auth-groupex'                  => $this->make_hook('groupex',            AUTH_COOKIE, 'user'),
             'admin/auth-groupes-x'          => $this->make_hook('admin_authgroupesx', AUTH_MDP,    'admin'),
         );
     }
index a9f4596..0f3eace 100644 (file)
@@ -26,16 +26,16 @@ class AXLetterModule extends NewsletterModule
     function handlers()
     {
         return array(
-            'ax'                   => $this->make_hook('nl',              AUTH_COOKIE),
+            'ax'                   => $this->make_hook('nl',              AUTH_COOKIE, 'user'),
             'ax/out'               => $this->make_hook('out',             AUTH_PUBLIC),
-            'ax/show'              => $this->make_hook('nl_show',         AUTH_COOKIE),
-            'ax/search'            => $this->make_hook('nl_search',       AUTH_COOKIE),
-            'ax/admin'             => $this->make_hook('admin_nl',        AUTH_MDP),
-            'ax/admin/edit'        => $this->make_hook('admin_nl_edit',   AUTH_MDP),
-            'ax/admin/edit/valid'  => $this->make_hook('admin_nl_valid',  AUTH_MDP),
-            'ax/admin/edit/cancel' => $this->make_hook('admin_nl_cancel', AUTH_MDP),
-            'ax/admin/edit/delete' => $this->make_hook('admin_nl_delete', AUTH_MDP),
-            'ax/admin/categories'  => $this->make_hook('admin_nl_cat',    AUTH_MDP),
+            'ax/show'              => $this->make_hook('nl_show',         AUTH_COOKIE, 'user'),
+            'ax/search'            => $this->make_hook('nl_search',       AUTH_COOKIE, 'user'),
+            'ax/admin'             => $this->make_hook('admin_nl',        AUTH_MDP,    'user'),
+            'ax/admin/edit'        => $this->make_hook('admin_nl_edit',   AUTH_MDP,    'user'),
+            'ax/admin/edit/valid'  => $this->make_hook('admin_nl_valid',  AUTH_MDP,    'user'),
+            'ax/admin/edit/cancel' => $this->make_hook('admin_nl_cancel', AUTH_MDP,    'user'),
+            'ax/admin/edit/delete' => $this->make_hook('admin_nl_delete', AUTH_MDP,    'user'),
+            'ax/admin/categories'  => $this->make_hook('admin_nl_cat',    AUTH_MDP,    'user'),
         );
     }
 
index 006aa83..2c6a129 100644 (file)
@@ -26,8 +26,8 @@ class DeltaTenModule extends PLModule
     function handlers()
     {
         return array(
-            'deltaten/search'   => $this->make_hook('index', AUTH_COOKIE),
-            'deltaten'          => $this->make_hook('index', AUTH_COOKIE),
+            'deltaten/search'   => $this->make_hook('index', AUTH_COOKIE, 'user'),
+            'deltaten'          => $this->make_hook('index', AUTH_COOKIE, 'user'),
         );
     }
 
index 73a22c7..e5049c5 100644 (file)
@@ -27,10 +27,10 @@ class EmailModule extends PLModule
             'emails'                  => $this->make_hook('emails',      AUTH_COOKIE, 'mail'),
             'emails/alias'            => $this->make_hook('alias',       AUTH_MDP,    'mail'),
             'emails/antispam'         => $this->make_hook('antispam',    AUTH_MDP,    'mail'),
-            'emails/broken'           => $this->make_hook('broken',      AUTH_COOKIE),
+            'emails/broken'           => $this->make_hook('broken',      AUTH_COOKIE, 'user'),
             'emails/redirect'         => $this->make_hook('redirect',    AUTH_MDP,    'mail'),
             'emails/send'             => $this->make_hook('send',        AUTH_MDP,    'mail'),
-            'emails/antispam/submit'  => $this->make_hook('submit',      AUTH_COOKIE),
+            'emails/antispam/submit'  => $this->make_hook('submit',      AUTH_COOKIE, 'user'),
             'emails/test'             => $this->make_hook('test',        AUTH_COOKIE, 'mail', NO_AUTH),
 
             'emails/rewrite/in'       => $this->make_hook('rewrite_in',  AUTH_PUBLIC),
index 0cb1c0f..f8e8dad 100644 (file)
@@ -26,16 +26,16 @@ class EPLetterModule extends NewsletterModule
     function handlers()
     {
         return array(
-            'epletter'                   => $this->make_hook('nl',              AUTH_COOKIE),
+            'epletter'                   => $this->make_hook('nl',              AUTH_COOKIE, 'user'),
             'epletter/out'               => $this->make_hook('out',             AUTH_PUBLIC),
-            'epletter/show'              => $this->make_hook('nl_show',         AUTH_COOKIE),
-            'epletter/search'            => $this->make_hook('nl_search',       AUTH_COOKIE),
-            'epletter/admin'             => $this->make_hook('admin_nl',        AUTH_MDP),
-            'epletter/admin/edit'        => $this->make_hook('admin_nl_edit',   AUTH_MDP),
-            'epletter/admin/edit/valid'  => $this->make_hook('admin_nl_valid',  AUTH_MDP),
-            'epletter/admin/edit/cancel' => $this->make_hook('admin_nl_cancel', AUTH_MDP),
-            'epletter/admin/edit/delete' => $this->make_hook('admin_nl_delete', AUTH_MDP),
-            'epletter/admin/categories'  => $this->make_hook('admin_nl_cat',    AUTH_MDP),
+            'epletter/show'              => $this->make_hook('nl_show',         AUTH_COOKIE, 'user'),
+            'epletter/search'            => $this->make_hook('nl_search',       AUTH_COOKIE, 'user'),
+            'epletter/admin'             => $this->make_hook('admin_nl',        AUTH_MDP,    'user'),
+            'epletter/admin/edit'        => $this->make_hook('admin_nl_edit',   AUTH_MDP,    'user'),
+            'epletter/admin/edit/valid'  => $this->make_hook('admin_nl_valid',  AUTH_MDP,    'user'),
+            'epletter/admin/edit/cancel' => $this->make_hook('admin_nl_cancel', AUTH_MDP,    'user'),
+            'epletter/admin/edit/delete' => $this->make_hook('admin_nl_delete', AUTH_MDP,    'user'),
+            'epletter/admin/categories'  => $this->make_hook('admin_nl_cat',    AUTH_MDP,    'user'),
         );
     }
 
index 3c4df28..b1f6482 100644 (file)
@@ -24,12 +24,12 @@ class EventsModule extends PLModule
     function handlers()
     {
         return array(
-            'events'         => $this->make_hook('ev',           AUTH_COOKIE),
+            'events'         => $this->make_hook('ev',           AUTH_COOKIE, 'user'),
             'events/preview' => $this->make_hook('preview',      AUTH_PUBLIC, 'user', NO_AUTH),
             'events/photo'   => $this->make_hook('photo',        AUTH_PUBLIC),
-            'events/submit'  => $this->make_hook('ev_submit',    AUTH_MDP),
+            'events/submit'  => $this->make_hook('ev_submit',    AUTH_MDP,    'user'),
             'admin/events'   => $this->make_hook('admin_events', AUTH_MDP,    'admin'),
-            'rss'            => $this->make_token_hook('rss',    AUTH_COOKIE),
+            'rss'            => $this->make_token_hook('rss',    AUTH_COOKIE, 'user'),
 
             'ajax/tips'      => $this->make_hook('tips',         AUTH_COOKIE, 'user', NO_AUTH),
             'admin/tips'     => $this->make_hook('admin_tips',   AUTH_MDP,    'admin'),
index 340dfd4..fafbe49 100644 (file)
@@ -24,8 +24,8 @@ class GeolocModule extends PLModule
     function handlers()
     {
         return array(
-            'map'     => $this->make_hook('map', AUTH_COOKIE),
-            'map_url' => $this->make_hook('map_url', AUTH_COOKIE)
+            'map'     => $this->make_hook('map',     AUTH_COOKIE, 'user'),
+            'map_url' => $this->make_hook('map_url', AUTH_COOKIE, 'user')
         );
     }
 
index 59f0bd0..688b0b0 100644 (file)
@@ -26,23 +26,23 @@ class ListsModule extends PLModule
     function handlers()
     {
         return array(
-            'lists'              => $this->make_hook('lists',     AUTH_MDP),
+            'lists'              => $this->make_hook('lists',     AUTH_MDP,    'user'),
             'lists/ajax'         => $this->make_hook('ajax',      AUTH_MDP,    'user', NO_AUTH),
             'lists/create'       => $this->make_hook('create',    AUTH_MDP,    'lists'),
 
-            'lists/members'      => $this->make_hook('members',   AUTH_COOKIE),
-            'lists/csv'          => $this->make_hook('csv',       AUTH_COOKIE),
-            'lists/annu'         => $this->make_hook('annu',      AUTH_COOKIE),
-            'lists/archives'     => $this->make_hook('archives',  AUTH_COOKIE),
+            'lists/members'      => $this->make_hook('members',   AUTH_COOKIE, 'user'),
+            'lists/csv'          => $this->make_hook('csv',       AUTH_COOKIE, 'user'),
+            'lists/annu'         => $this->make_hook('annu',      AUTH_COOKIE, 'user'),
+            'lists/archives'     => $this->make_hook('archives',  AUTH_COOKIE, 'user'),
             'lists/archives/rss' => $this->make_hook('rss',       AUTH_PUBLIC, 'user', NO_HTTPS),
 
-            'lists/moderate'     => $this->make_hook('moderate',  AUTH_MDP),
-            'lists/admin'        => $this->make_hook('admin',     AUTH_MDP),
-            'lists/options'      => $this->make_hook('options',   AUTH_MDP),
-            'lists/delete'       => $this->make_hook('delete',    AUTH_MDP),
+            'lists/moderate'     => $this->make_hook('moderate',  AUTH_MDP,    'user'),
+            'lists/admin'        => $this->make_hook('admin',     AUTH_MDP,    'user'),
+            'lists/options'      => $this->make_hook('options',   AUTH_MDP,    'user'),
+            'lists/delete'       => $this->make_hook('delete',    AUTH_MDP,    'user'),
 
-            'lists/soptions'     => $this->make_hook('soptions',  AUTH_MDP),
-            'lists/check'        => $this->make_hook('check',     AUTH_MDP),
+            'lists/soptions'     => $this->make_hook('soptions',  AUTH_MDP,    'user'),
+            'lists/check'        => $this->make_hook('check',     AUTH_MDP,    'user'),
             'admin/lists'        => $this->make_hook('admin_all', AUTH_MDP,    'admin'),
             'admin/aliases'      => $this->make_hook('aaliases',  AUTH_MDP,    'admin')
         );
index 33f131a..5086e96 100644 (file)
@@ -24,15 +24,15 @@ class MarketingModule extends PLModule
     function handlers()
     {
         return array(
-            'marketing'            => $this->make_hook('marketing',  AUTH_MDP, 'admin'),
-            'marketing/promo'      => $this->make_hook('promo',      AUTH_MDP, 'admin'),
-            'marketing/relance'    => $this->make_hook('relance',    AUTH_MDP, 'admin'),
-            'marketing/this_week'  => $this->make_hook('week',       AUTH_MDP, 'admin'),
-            'marketing/volontaire' => $this->make_hook('volontaire', AUTH_MDP, 'admin'),
-
-            'marketing/private'    => $this->make_hook('private',    AUTH_MDP, 'admin'),
-            'marketing/public'     => $this->make_hook('public',     AUTH_COOKIE),
-            'marketing/broken'     => $this->make_hook('broken',     AUTH_COOKIE),
+            'marketing'            => $this->make_hook('marketing',  AUTH_MDP,    'admin'),
+            'marketing/promo'      => $this->make_hook('promo',      AUTH_MDP,    'admin'),
+            'marketing/relance'    => $this->make_hook('relance',    AUTH_MDP,    'admin'),
+            'marketing/this_week'  => $this->make_hook('week',       AUTH_MDP,    'admin'),
+            'marketing/volontaire' => $this->make_hook('volontaire', AUTH_MDP,    'admin'),
+
+            'marketing/private'    => $this->make_hook('private',    AUTH_MDP,    'admin'),
+            'marketing/public'     => $this->make_hook('public',     AUTH_COOKIE, 'user'),
+            'marketing/broken'     => $this->make_hook('broken',     AUTH_COOKIE, 'user'),
         );
     }
 
index 149e27b..a975ba3 100644 (file)
@@ -24,16 +24,16 @@ class NewsletterModule extends PLModule
     function handlers()
     {
         return array(
-            'nl'                           => $this->make_hook('nl',              AUTH_COOKIE),
-            'nl/show'                      => $this->make_hook('nl_show',         AUTH_COOKIE),
-            'nl/search'                    => $this->make_hook('nl_search',       AUTH_COOKIE),
-            'nl/submit'                    => $this->make_hook('nl_submit',       AUTH_MDP),
-            'nl/remaining'                 => $this->make_hook('nl_remaining',    AUTH_MDP),
-            'admin/nls'                    => $this->make_hook('admin_nl_groups', AUTH_MDP, 'admin'),
-            'admin/newsletter'             => $this->make_hook('admin_nl',        AUTH_MDP, 'admin'),
-            'admin/newsletter/categories'  => $this->make_hook('admin_nl_cat',    AUTH_MDP, 'admin'),
-            'admin/newsletter/edit'        => $this->make_hook('admin_nl_edit',   AUTH_MDP, 'admin'),
-            'admin/newsletter/edit/delete' => $this->make_hook('admin_nl_delete', AUTH_MDP, 'admin'),
+            'nl'                           => $this->make_hook('nl',              AUTH_COOKIE, 'user'),
+            'nl/show'                      => $this->make_hook('nl_show',         AUTH_COOKIE, 'user'),
+            'nl/search'                    => $this->make_hook('nl_search',       AUTH_COOKIE, 'user'),
+            'nl/submit'                    => $this->make_hook('nl_submit',       AUTH_MDP,    'user'),
+            'nl/remaining'                 => $this->make_hook('nl_remaining',    AUTH_MDP,    'user'),
+            'admin/nls'                    => $this->make_hook('admin_nl_groups', AUTH_MDP,    'admin'),
+            'admin/newsletter'             => $this->make_hook('admin_nl',        AUTH_MDP,    'admin'),
+            'admin/newsletter/categories'  => $this->make_hook('admin_nl_cat',    AUTH_MDP,    'admin'),
+            'admin/newsletter/edit'        => $this->make_hook('admin_nl_edit',   AUTH_MDP,    'admin'),
+            'admin/newsletter/edit/delete' => $this->make_hook('admin_nl_delete', AUTH_MDP,    'admin'),
             // Automatic mailing is disabled for X.org NL
 //            'admin/newsletter/edit/cancel' => $this->make_hook('cancel', AUTH_MDP, 'admin'),
 //            'admin/newsletter/edit/valid'  => $this->make_hook('valid',  AUTH_MDP, 'admin'),
index 49b08c1..fa4c1d5 100644 (file)
@@ -64,8 +64,8 @@ class OpenidModule extends PLModule
             'openid'               => $this->make_hook('openid',        AUTH_PUBLIC),
             'openid/melix'         => $this->make_hook('melix',         AUTH_PUBLIC),
             'openid/xrds'          => $this->make_hook('xrds',          AUTH_PUBLIC),
-            'openid/trust'         => $this->make_hook('trust',         AUTH_MDP),
-            'openid/trusted'       => $this->make_hook('trusted',       AUTH_MDP),
+            'openid/trust'         => $this->make_hook('trust',         AUTH_MDP, 'user'),
+            'openid/trusted'       => $this->make_hook('trusted',       AUTH_MDP, 'user'),
             'admin/openid/trusted' => $this->make_hook('admin_trusted', AUTH_MDP, 'admin'),
         );
     }
index 06efdb8..91771e6 100644 (file)
@@ -108,8 +108,8 @@ class PaymentModule extends PLModule
             'payment'                      => $this->make_hook('payment',          AUTH_MDP,    'payment'),
             'payment/cyber2_return'        => $this->make_hook('cyber2_return',    AUTH_PUBLIC, 'user', NO_HTTPS),
             'payment/paypal_return'        => $this->make_hook('paypal_return',    AUTH_PUBLIC, 'user', NO_HTTPS),
-            '%grp/paiement'                => $this->make_hook('xnet_payment',     AUTH_MDP),
-            '%grp/payment'                 => $this->make_hook('xnet_payment',     AUTH_MDP),
+            '%grp/paiement'                => $this->make_hook('xnet_payment',     AUTH_MDP,    'user'),
+            '%grp/payment'                 => $this->make_hook('xnet_payment',     AUTH_MDP,    'user'),
             '%grp/payment/csv'             => $this->make_hook('payment_csv',      AUTH_MDP,    'groupadmin'),
             '%grp/payment/cyber2_return'   => $this->make_hook('cyber2_return',    AUTH_PUBLIC, 'user', NO_HTTPS),
             '%grp/payment/paypal_return'   => $this->make_hook('paypal_return',    AUTH_PUBLIC, 'user', NO_HTTPS),
index 715ba78..f57f270 100644 (file)
@@ -43,15 +43,15 @@ class PlatalModule extends PLModule
             'changelog'         => $this->make_hook('changelog', AUTH_PUBLIC),
 
             // Preferences thingies
-            'prefs'             => $this->make_hook('prefs',     AUTH_COOKIE),
-            'prefs/rss'         => $this->make_hook('prefs_rss', AUTH_COOKIE),
-            'prefs/webredirect' => $this->make_hook('webredir',  AUTH_MDP, 'mail'),
-            'prefs/skin'        => $this->make_hook('skin',      AUTH_COOKIE),
+            'prefs'             => $this->make_hook('prefs',     AUTH_COOKIE, 'user'),
+            'prefs/rss'         => $this->make_hook('prefs_rss', AUTH_COOKIE, 'user'),
+            'prefs/webredirect' => $this->make_hook('webredir',  AUTH_MDP,    'mail'),
+            'prefs/skin'        => $this->make_hook('skin',      AUTH_COOKIE, 'user'),
 
             // password related thingies
-            'password'          => $this->make_hook('password',  AUTH_MDP),
+            'password'          => $this->make_hook('password',  AUTH_MDP,    'user'),
             'tmpPWD'            => $this->make_hook('tmpPWD',    AUTH_PUBLIC),
-            'password/smtp'     => $this->make_hook('smtppass',  AUTH_MDP, 'mail'),
+            'password/smtp'     => $this->make_hook('smtppass',  AUTH_MDP,    'mail'),
             'recovery'          => $this->make_hook('recovery',  AUTH_PUBLIC),
             'exit'              => $this->make_hook('exit',      AUTH_PUBLIC),
             'review'            => $this->make_hook('review',    AUTH_PUBLIC),
index 954753e..4c9f998 100644 (file)
@@ -25,15 +25,15 @@ class ProfileModule extends PLModule
     {
         return array(
             'photo'                      => $this->make_hook('photo',                      AUTH_PUBLIC),
-            'photo/change'               => $this->make_hook('photo_change',               AUTH_MDP),
+            'photo/change'               => $this->make_hook('photo_change',               AUTH_MDP,    'user'),
 
             'fiche.php'                  => $this->make_hook('fiche',                      AUTH_PUBLIC),
             'profile'                    => $this->make_hook('profile',                    AUTH_PUBLIC),
-            'profile/private'            => $this->make_hook('profile',                    AUTH_COOKIE),
+            'profile/private'            => $this->make_hook('profile',                    AUTH_COOKIE, 'user'),
             'profile/ax'                 => $this->make_hook('ax',                         AUTH_COOKIE, 'admin,edit_directory'),
-            'profile/edit'               => $this->make_hook('p_edit',                     AUTH_MDP),
+            'profile/edit'               => $this->make_hook('p_edit',                     AUTH_MDP,    'user'),
             'profile/ajax/address'       => $this->make_hook('ajax_address',               AUTH_COOKIE, 'user', NO_AUTH),
-            'profile/ajax/address/del'   => $this->make_hook('ajax_address_del',           AUTH_MDP),
+            'profile/ajax/address/del'   => $this->make_hook('ajax_address_del',           AUTH_MDP,    'user'),
             'profile/ajax/tel'           => $this->make_hook('ajax_tel',                   AUTH_COOKIE, 'user', NO_AUTH),
             'profile/ajax/edu'           => $this->make_hook('ajax_edu',                   AUTH_COOKIE, 'user', NO_AUTH),
             'profile/ajax/medal'         => $this->make_hook('ajax_medal',                 AUTH_COOKIE, 'user', NO_AUTH),
@@ -45,15 +45,15 @@ class ProfileModule extends PLModule
             'profile/ajax/buildnames'    => $this->make_hook('ajax_buildnames',            AUTH_COOKIE, 'user', NO_AUTH),
             'profile/ajax/tree/jobterms' => $this->make_hook('ajax_tree_job_terms',        AUTH_COOKIE, 'user', NO_AUTH),
             'profile/jobterms'           => $this->make_hook('jobterms',                   AUTH_COOKIE, 'user', NO_AUTH),
-            'javascript/education.js'    => $this->make_hook('education_js',               AUTH_COOKIE),
-            'javascript/grades.js'       => $this->make_hook('grades_js',                  AUTH_COOKIE),
+            'javascript/education.js'    => $this->make_hook('education_js',               AUTH_COOKIE, 'user'),
+            'javascript/grades.js'       => $this->make_hook('grades_js',                  AUTH_COOKIE, 'user'),
             'profile/medal'              => $this->make_hook('medal',                      AUTH_PUBLIC),
 
-            'referent'                   => $this->make_hook('referent',                   AUTH_COOKIE),
+            'referent'                   => $this->make_hook('referent',                   AUTH_COOKIE, 'user'),
             'referent/country'           => $this->make_hook('ref_country',                AUTH_COOKIE, 'user', NO_AUTH),
             'referent/autocomplete'      => $this->make_hook('ref_autocomplete',           AUTH_COOKIE, 'user', NO_AUTH),
 
-            'groupes-x'                  => $this->make_hook('xnet',                       AUTH_COOKIE),
+            'groupes-x'                  => $this->make_hook('xnet',                       AUTH_COOKIE, 'user'),
             'groupes-x/logo'             => $this->make_hook('xnetlogo',                   AUTH_PUBLIC),
 
             'vcard'                      => $this->make_hook('vcard',                      AUTH_COOKIE, 'user', NO_HTTPS),
index d1e6fd4..a395c4d 100644 (file)
@@ -24,7 +24,7 @@ class ReminderModule extends PLModule
     function handlers()
     {
         return array(
-            'ajax/reminder' => $this->make_hook('reminder', AUTH_COOKIE),
+            'ajax/reminder' => $this->make_hook('reminder', AUTH_COOKIE, 'user'),
         );
     }
 
index 237c739..0504a77 100644 (file)
@@ -30,10 +30,10 @@ class SearchModule extends PLModule
             'search/autocomplete'       => $this->make_hook('autocomplete',       AUTH_COOKIE, 'directory_ax', NO_AUTH),
             'search/list'               => $this->make_hook('list',               AUTH_COOKIE, 'directory_ax', NO_AUTH),
             'search/list/count'         => $this->make_hook('list_count',         AUTH_COOKIE, 'directory_ax', NO_AUTH),
-            'jobs'                      => $this->make_hook('referent',           AUTH_COOKIE),
-            'emploi'                    => $this->make_hook('referent',           AUTH_COOKIE),
-            'referent/search'           => $this->make_hook('referent',           AUTH_COOKIE),
-            'search/referent/countries' => $this->make_hook('referent_countries', AUTH_COOKIE),
+            'jobs'                      => $this->make_hook('referent',           AUTH_COOKIE, 'user'),
+            'emploi'                    => $this->make_hook('referent',           AUTH_COOKIE, 'user'),
+            'referent/search'           => $this->make_hook('referent',           AUTH_COOKIE, 'user'),
+            'search/referent/countries' => $this->make_hook('referent_countries', AUTH_COOKIE, 'user'),
         );
     }
 
index aa830a3..767db42 100644 (file)
@@ -36,11 +36,11 @@ class StatsModule extends PLModule
     function handlers()
     {
         return array(
-            'stats'                 => $this->make_hook('stats',     AUTH_COOKIE),
-            'stats/evolution'       => $this->make_hook('evolution', AUTH_COOKIE),
-            'stats/graph'           => $this->make_hook('graph',     AUTH_COOKIE),
-            'stats/graph/evolution' => $this->make_hook('graph_evo', AUTH_COOKIE),
-            'stats/promos'          => $this->make_hook('promos',    AUTH_COOKIE),
+            'stats'                 => $this->make_hook('stats',     AUTH_COOKIE, 'user'),
+            'stats/evolution'       => $this->make_hook('evolution', AUTH_COOKIE, 'user'),
+            'stats/graph'           => $this->make_hook('graph',     AUTH_COOKIE, 'user'),
+            'stats/graph/evolution' => $this->make_hook('graph_evo', AUTH_COOKIE, 'user'),
+            'stats/promos'          => $this->make_hook('promos',    AUTH_COOKIE, 'user'),
 
             'stats/coupures'        => $this->make_hook('coupures',  AUTH_PUBLIC),
         );
index f23dc7b..eaef664 100644 (file)
@@ -28,12 +28,12 @@ class SurveyModule extends PLModule
             'survey'             => $this->make_hook('index',         AUTH_PUBLIC),
             'survey/vote'        => $this->make_hook('vote',          AUTH_PUBLIC),
             'survey/result'      => $this->make_hook('result',        AUTH_PUBLIC),
-            'survey/edit'        => $this->make_hook('edit',          AUTH_COOKIE),
-            'survey/ajax'        => $this->make_hook('ajax',          AUTH_COOKIE),
-            'survey/admin'       => $this->make_hook('admin',         AUTH_MDP, 'admin'),
-            'survey/admin/edit'  => $this->make_hook('adminEdit',     AUTH_MDP, 'admin'),
-            'survey/admin/valid' => $this->make_hook('adminValidate', AUTH_MDP, 'admin'),
-            'survey/admin/del'   => $this->make_hook('adminDelete',   AUTH_MDP, 'admin'),
+            'survey/edit'        => $this->make_hook('edit',          AUTH_COOKIE, 'user'),
+            'survey/ajax'        => $this->make_hook('ajax',          AUTH_COOKIE, 'user'),
+            'survey/admin'       => $this->make_hook('admin',         AUTH_MDP,    'admin'),
+            'survey/admin/edit'  => $this->make_hook('adminEdit',     AUTH_MDP,    'admin'),
+            'survey/admin/valid' => $this->make_hook('adminValidate', AUTH_MDP,    'admin'),
+            'survey/admin/del'   => $this->make_hook('adminDelete',   AUTH_MDP,    'admin'),
         );
     }
     // }}}
index 1140b98..738a2ce 100644 (file)
@@ -31,8 +31,8 @@ class XnetModule extends PLModule
             'groups'       => $this->make_hook('groups',       AUTH_PUBLIC),
             'groupes.php'  => $this->make_hook('groups2',      AUTH_PUBLIC),
             'plan'         => $this->make_hook('plan',         AUTH_PUBLIC),
-            'photo'        => $this->make_hook('photo',        AUTH_MDP),
-            'autologin'    => $this->make_hook('autologin',    AUTH_MDP),
+            'photo'        => $this->make_hook('photo',        AUTH_MDP, 'user'),
+            'autologin'    => $this->make_hook('autologin',    AUTH_MDP, 'user'),
             'login/ext'    => $this->make_hook('login_ext',    AUTH_PUBLIC),
             'register/ext' => $this->make_hook('register_ext', AUTH_PUBLIC),
             'recovery/ext' => $this->make_hook('recovery_ext', AUTH_PUBLIC),
index edee012..3d2118f 100644 (file)
@@ -26,8 +26,8 @@ class XnetEventsModule extends PLModule
     function handlers()
     {
         return array(
-            '%grp/events'       => $this->make_hook('events', AUTH_MDP),
-            '%grp/events/sub'   => $this->make_hook('sub',    AUTH_MDP),
+            '%grp/events'       => $this->make_hook('events', AUTH_MDP, 'user'),
+            '%grp/events/sub'   => $this->make_hook('sub',    AUTH_MDP, 'user'),
             '%grp/events/csv'   => $this->make_hook('csv',    AUTH_MDP, 'user', NO_HTTPS),
             '%grp/events/ical'  => $this->make_hook('ical',   AUTH_MDP, 'user', NO_HTTPS),
             '%grp/events/edit'  => $this->make_hook('edit',   AUTH_MDP, 'groupadmin'),
index 87daf14..a53b3d9 100644 (file)
@@ -40,11 +40,11 @@ class XnetGrpModule extends PLModule
             '%grp/directory/unact' => $this->make_hook('non_active',            AUTH_MDP, 'groupadmin'),
             '%grp/trombi'          => $this->make_hook('trombi',                AUTH_MDP, 'groupannu'),
             '%grp/geoloc'          => $this->make_hook('geoloc',                AUTH_MDP, 'groupannu'),
-            '%grp/subscribe'       => $this->make_hook('subscribe',             AUTH_MDP),
+            '%grp/subscribe'       => $this->make_hook('subscribe',             AUTH_MDP, 'user'),
             '%grp/subscribe/valid' => $this->make_hook('subscribe_valid',       AUTH_MDP, 'groupadmin'),
             '%grp/unsubscribe'     => $this->make_hook('unsubscribe',           AUTH_MDP, 'groupmember'),
 
-            '%grp/change_rights'   => $this->make_hook('change_rights',         AUTH_MDP),
+            '%grp/change_rights'   => $this->make_hook('change_rights',         AUTH_MDP, 'user'),
             '%grp/admin/annuaire'  => $this->make_hook('admin_annuaire',        AUTH_MDP, 'groupadmin'),
             '%grp/member'          => $this->make_hook('admin_member',          AUTH_MDP, 'groupadmin'),
             '%grp/member/new'      => $this->make_hook('admin_member_new',      AUTH_MDP, 'groupadmin'),
index d018754..dea081b 100644 (file)
@@ -28,26 +28,26 @@ class XnetListsModule extends ListsModule
     function handlers()
     {
         return array(
-            '%grp/lists'              => $this->make_hook('lists',    AUTH_MDP, 'groupmember'),
-            '%grp/lists/create'       => $this->make_hook('create',   AUTH_MDP, 'groupmember'),
+            '%grp/lists'              => $this->make_hook('lists',    AUTH_MDP,    'groupmember'),
+            '%grp/lists/create'       => $this->make_hook('create',   AUTH_MDP,    'groupmember'),
 
-            '%grp/lists/members'      => $this->make_hook('members',  AUTH_COOKIE),
-            '%grp/lists/csv'          => $this->make_hook('csv',      AUTH_COOKIE),
-            '%grp/lists/annu'         => $this->make_hook('annu',     AUTH_COOKIE),
-            '%grp/lists/archives'     => $this->make_hook('archives', AUTH_COOKIE),
+            '%grp/lists/members'      => $this->make_hook('members',  AUTH_COOKIE, 'user'),
+            '%grp/lists/csv'          => $this->make_hook('csv',      AUTH_COOKIE, 'user'),
+            '%grp/lists/annu'         => $this->make_hook('annu',     AUTH_COOKIE, 'user'),
+            '%grp/lists/archives'     => $this->make_hook('archives', AUTH_COOKIE, 'user'),
             '%grp/lists/archives/rss' => $this->make_hook('rss',      AUTH_PUBLIC),
 
-            '%grp/lists/moderate'     => $this->make_hook('moderate', AUTH_MDP),
-            '%grp/lists/admin'        => $this->make_hook('admin',    AUTH_MDP),
-            '%grp/lists/options'      => $this->make_hook('options',  AUTH_MDP),
-            '%grp/lists/delete'       => $this->make_hook('delete',   AUTH_MDP),
+            '%grp/lists/moderate'     => $this->make_hook('moderate', AUTH_MDP,    'user'),
+            '%grp/lists/admin'        => $this->make_hook('admin',    AUTH_MDP,    'user'),
+            '%grp/lists/options'      => $this->make_hook('options',  AUTH_MDP,    'user'),
+            '%grp/lists/delete'       => $this->make_hook('delete',   AUTH_MDP,    'user'),
 
-            '%grp/lists/soptions'     => $this->make_hook('soptions', AUTH_MDP),
-            '%grp/lists/check'        => $this->make_hook('check',    AUTH_MDP),
-            '%grp/lists/sync'         => $this->make_hook('sync',     AUTH_MDP),
+            '%grp/lists/soptions'     => $this->make_hook('soptions', AUTH_MDP,    'user'),
+            '%grp/lists/check'        => $this->make_hook('check',    AUTH_MDP,    'user'),
+            '%grp/lists/sync'         => $this->make_hook('sync',     AUTH_MDP,    'user'),
 
-            '%grp/alias/admin'        => $this->make_hook('aadmin',   AUTH_MDP, 'groupadmin'),
-            '%grp/alias/create'       => $this->make_hook('acreate',  AUTH_MDP, 'groupadmin'),
+            '%grp/alias/admin'        => $this->make_hook('aadmin',   AUTH_MDP,    'groupadmin'),
+            '%grp/alias/create'       => $this->make_hook('acreate',  AUTH_MDP,    'groupadmin'),
 
             /* hack: lists uses that */
             'profile'                 => $this->make_hook('profile',  AUTH_PUBLIC),
index b849193..8d16008 100644 (file)
@@ -26,9 +26,9 @@ class XnetNlModule extends NewsletterModule
     function handlers()
     {
         return array(
-            '%grp/nl'                   => $this->make_hook('nl',              AUTH_MDP),
-            '%grp/nl/show'              => $this->make_hook('nl_show',         AUTH_MDP),
-            '%grp/nl/search'            => $this->make_hook('nl_search',       AUTH_MDP),
+            '%grp/nl'                   => $this->make_hook('nl',              AUTH_MDP, 'user'),
+            '%grp/nl/show'              => $this->make_hook('nl_show',         AUTH_MDP, 'user'),
+            '%grp/nl/search'            => $this->make_hook('nl_search',       AUTH_MDP, 'user'),
             '%grp/admin/nl'             => $this->make_hook('admin_nl',        AUTH_MDP, 'groupadmin'),
             '%grp/admin/nl/sync'        => $this->make_hook('admin_nl_sync',   AUTH_MDP, 'groupadmin'),
             '%grp/admin/nl/enable'      => $this->make_hook('admin_nl_enable', AUTH_MDP, 'groupadmin'),