X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fopenid.php;h=7d1e875f3655af82549e054418fe152b5057998c;hb=c4b453748e0affd8711c3a7a95ab6beaad2c2834;hp=08eeb864c9e0168d5caafb26f1ddb283441b1d77;hpb=a8e858d3a37bb776d2c7f9612a86f780ea64e037;p=platal.git diff --git a/modules/openid.php b/modules/openid.php index 08eeb86..7d1e875 100644 --- a/modules/openid.php +++ b/modules/openid.php @@ -1,6 +1,6 @@ $this->make_hook('openid', AUTH_PUBLIC), 'openid/trust' => $this->make_hook('trust', AUTH_COOKIE), + 'openid/trusted' => $this->make_hook('trusted', AUTH_MDP), + 'admin/openid/trusted' => $this->make_hook('admin_trusted', AUTH_MDP), 'openid/idp_xrds' => $this->make_hook('idp_xrds', AUTH_PUBLIC), 'openid/user_xrds' => $this->make_hook('user_xrds', AUTH_PUBLIC), 'openid/melix' => $this->make_hook('melix', AUTH_PUBLIC), @@ -193,6 +195,30 @@ class OpenidModule extends PLModule $this->render_openid_response($webresponse); } + function handler_trusted(&$page, $action = 'list', $id = null) + { + $page->setTitle('Sites tiers de confiance'); + $page->assign('title', 'Mes sites tiers de confiance pour OpenId'); + $table_editor = new PLTableEditor('openid/trusted', 'openid_trusted', 'id'); + $table_editor->set_where_clause('user_id = ' . XDB::escape(S::user()->id())); + $table_editor->vars['user_id']['display'] = false; + $table_editor->describe('url', 'site tiers', true); + $page->assign('deleteonly', true); + $table_editor->apply($page, $action, $id); + } + + function handler_admin_trusted(&$page, $action = 'list', $id = null) + { + $page->setTitle('Sites tiers de confiance'); + $page->assign('title', 'Sites tiers de confiance globaux pour OpenId'); + $table_editor = new PLTableEditor('admin/openid/trusted', 'openid_trusted', 'id'); + $table_editor->set_where_clause('user_id IS NULL'); + $table_editor->vars['user_id']['display'] = false; + $table_editor->describe('url', 'site tiers', true); + $page->assign('readonly', true); + $table_editor->apply($page, $action, $id); + } + function handler_idp_xrds(&$page) { $this->load('openid.inc.php');