[Catalyst-commits] r13487 - in
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session:
. Test-Session-Broken Test-Session-Broken/lib
Test-Session-Broken/lib/Test Test-Session-Broken/lib/Test/LDAP
Test-Session-Broken/lib/Test/LDAP/Controller
Test-Session-Broken/lib/Test/LDAP/Model
Test-Session-Broken/lib/Test/LDAP/View
Test-Session-Broken/root Test-Session-Broken/root/auth
Test-Session-Broken/root/common Test-Session-Broken/root/forms
Test-Session-Broken/root/forms/auth
Test-Session-Broken/root/forms/search
Test-Session-Broken/root/forms/user Test-Session-Broken/root/static
Test-Session-Broken/root/static/css
Test-Session-Broken/root/static/images
Test-Session-Broken/root/user Test-Session-Broken/script
Test-Session-Broken/t
zykes at dev.catalyst.perl.org
zykes at dev.catalyst.perl.org
Mon Aug 16 11:39:11 GMT 2010
Author: zykes
Date: 2010-08-16 12:39:11 +0100 (Mon, 16 Aug 2010)
New Revision: 13487
Added:
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/Changes
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/META.yml
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/Makefile.PL
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/README
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/config.json
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP.pm
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Controller/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Controller/Auth.pm
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Controller/Root.pm
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Controller/User.pm
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Model/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Model/LDAP.pm
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/View/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/View/TT.pm
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/auth/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/auth/index.tt
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/auth/login.tt
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/common/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/common/noarg.tt
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/common/noresult.tt
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/common/results.tt
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/default.tt
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/error-404.tt
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/error-500.tt
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/error-generic.tt
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/favicon.ico
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/auth/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/auth/index.json
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/search/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/search/index.json
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/user/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/user/edit.json
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/index.tt
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/css/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/css/style.css
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_120x50_built.png
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_120x50_built_shadow.png
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_120x50_powered.png
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_120x50_powered_shadow.png
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_88x31_built.png
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_88x31_built_shadow.png
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_88x31_powered.png
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_88x31_powered_shadow.png
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/catalyst_logo.png
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/user/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/user/edit.tt
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_cgi.pl
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_create.pl
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_fastcgi.pl
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_server.pl
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_test.pl
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/01app.t
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/02pod.t
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/03podcoverage.t
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/controller_Auth.t
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/controller_User.t
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/ldap_client.t
Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/view_TT.t
Log:
Broken app
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/Changes
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/Changes (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/Changes 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,4 @@
+This file documents the revision history for Perl extension Test::LDAP.
+
+0.01 2010-08-03 15:00:19
+ - initial revision, generated by Catalyst
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/META.yml
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/META.yml (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/META.yml 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,39 @@
+---
+abstract: 'Catalyst based application'
+author:
+ - root
+build_requires:
+ ExtUtils::MakeMaker: 6.42
+ Test::More: 0.88
+configure_requires:
+ ExtUtils::MakeMaker: 6.42
+distribution_type: module
+generated_by: 'Module::Install version 1.00'
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: Test-LDAP
+no_index:
+ directory:
+ - inc
+ - t
+requires:
+ Catalyst::Action::RenderView: 0
+ Catalyst::Authentication::Store::LDAP: 0
+ Catalyst::Controller::HTML::FormFu: 0
+ Catalyst::Model::Adaptor: 0
+ Catalyst::Plugin::Authentication: 0
+ Catalyst::Plugin::Authorization::Roles: 0
+ Catalyst::Plugin::ConfigLoader: 0
+ Catalyst::Plugin::Session: 0
+ Catalyst::Plugin::Session::State::Cookie: 0
+ Catalyst::Plugin::Session::Store::FastMmap: 0
+ Catalyst::Plugin::Static::Simple: 0
+ Catalyst::Runtime: 5.80024
+ Config::JSON: 0
+ Moose: 0
+ namespace::autoclean: 0
+resources:
+ license: http://dev.perl.org/licenses/
+version: 0.01
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/Makefile.PL
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/Makefile.PL (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/Makefile.PL 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,38 @@
+#!/usr/bin/env perl
+# IMPORTANT: if you delete this file your app will not work as
+# expected. You have been warned.
+use inc::Module::Install;
+use Module::Install::Catalyst; # Complain loudly if you don't have
+ # Catalyst::Devel installed or haven't said
+ # 'make dist' to create a standalone tarball.
+
+name 'Test-LDAP';
+all_from 'lib/Test/LDAP.pm';
+
+requires 'Catalyst::Runtime' => '5.80024';
+
+requires 'Catalyst::Plugin::Authentication';
+requires 'Catalyst::Plugin::Authorization::Roles';
+requires 'Catalyst::Authentication::Store::LDAP';
+
+requires 'Catalyst::Plugin::Session';
+requires 'Catalyst::Plugin::Session::State::Cookie';
+requires 'Catalyst::Plugin::Session::Store::FastMmap';
+
+requires 'Catalyst::Plugin::ConfigLoader';
+requires 'Catalyst::Plugin::Static::Simple';
+requires 'Catalyst::Action::RenderView';
+
+requires 'Catalyst::Model::Adaptor';
+requires 'Catalyst::Controller::HTML::FormFu';
+
+requires 'Moose';
+requires 'namespace::autoclean';
+requires 'Config::JSON'; # This should reflect the config file format you've chosen
+ # See Catalyst::Plugin::ConfigLoader for supported formats
+test_requires 'Test::More' => '0.88';
+catalyst;
+
+install_script glob('script/*.pl');
+auto_install;
+WriteAll;
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/README
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/README (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/README 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1 @@
+Run script/test_ldap_server.pl to test the application.
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/config.json
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/config.json (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/config.json 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,46 @@
+{
+ "name" : "Test::LDAP",
+
+
+ "authentication" : {
+ "default_realm" : "ldap",
+
+ "realms" : {
+ "ldap" : {
+ "credential" : {
+ "class" : "Password",
+ "password_field" : "password",
+ "password_type" : "self_check",
+ "password_hash_type" : "crypt"
+ },
+
+ "store" : {
+ "binddn" : "anonymous",
+ "bindpw" : "dontcare",
+
+ "class" : "LDAP",
+
+ "ldap_server" : "ldap.test.no",
+ "ldap_server_options" : { "timeout" : 30, "port" : "636", "scheme" : "ldaps" },
+
+
+ "role_basedn" : "ou=stavanger,o=test,c=no",
+ "role_field" : "cn",
+ "role_filter" : "(&(objectClass=groupOfNames)(member=%s))",
+ "role_scope" : "one",
+ "role_search_options" : { "deref" : "always" },
+ "role_value" : "dn",
+ "role_search_as_user" : "1",
+
+ "user_basedn" : "ou=stavanger,o=test,c=no",
+ "user_field" : "uid",
+ "user_filter" : "(&(objectClass=posixAccount)(uid=%s))",
+ "user_scope" : "one",
+ "user_search_options" : { "deref" : "always" }
+ }
+ }
+ }
+ },
+
+ "Controller::HTML::FormFu" : { "config_file_ext" : ".json" }
+}
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Controller/Auth.pm
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Controller/Auth.pm (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Controller/Auth.pm 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,86 @@
+package Test::LDAP::Controller::Auth;
+use Moose;
+use namespace::autoclean;
+
+BEGIN {extends 'Catalyst::Controller::HTML::FormFu'; }
+
+=head1 NAME
+
+Test::LDAP::Controller::Auth - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index
+
+=cut
+sub index :Path :Args(0) :FormConfig {
+ my ( $self, $c ) = @_;
+
+ my $form = $c->stash->{form};
+}
+
+sub login :Path("login") :Args(0) {
+ my ( $self, $c ) = @_;
+
+ my $user = $c->req->params->{'username'};
+ my $pass = $c->req->params->{'password'};
+
+
+ if ($c->user_exists) {
+ $c->response->redirect( $c->uri_for( $c->controller("Auth")->action_for("index") ) )
+ }
+
+ # Got username / pass?
+ if ( defined ($user) && defined ($pass) ) {
+ # Let's auth
+ my $auth = $c->authenticate (
+ { username => $user, password => $pass }, "ldap"
+ );
+
+ # Let's check if we are authed, if we are then we forward to the index.
+ # Else we'll throw an error into message and display the login page
+ if ($auth) {
+ $c->response->redirect( $c->uri_for( $c->controller("Root")->action_for("index") ) );;
+
+ # Since we got auth, let's bind with the model with a dn & pass as well.
+ #$c->model('LDAP')->bind (dn => $
+ } else {
+ $c->stash->{"message"} = ("Bad username and/or password");
+ }
+
+ } else {
+ # If not throw a message c
+ $c->stash->{"message"} = "Missing Username and/or password"
+ }
+}
+
+sub logout : Path("logout") {
+ my ( $self, $c ) = @_;
+
+ if ($c->user_exists) {
+ $c->logout;
+ }
+ $c->response->redirect( $c->uri_for( $c->controller("Root")->action_for("index") ) )
+}
+
+=head1 AUTHOR
+
+root
+
+=head1 LICENSE
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+__PACKAGE__->meta->make_immutable;
+
+1;
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Controller/Root.pm
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Controller/Root.pm (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Controller/Root.pm 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,78 @@
+package Test::LDAP::Controller::Root;
+use Moose;
+use namespace::autoclean;
+
+BEGIN { extends 'Catalyst::Controller' }
+
+#
+# Sets the actions in this controller to be registered with no prefix
+# so they function identically to actions created in MyApp.pm
+#
+__PACKAGE__->config(namespace => '');
+
+=head1 NAME
+
+Test::LDAP::Controller::Root - Root Controller for Test::LDAP
+
+=head1 DESCRIPTION
+
+[enter your description here]
+
+=head1 METHODS
+
+=head2 itndex
+
+The root page (/)
+
+=cut
+
+sub index :Path :Args(0) {
+ my ( $self, $c ) = @_;
+}
+
+=head2 default
+
+Standard 404 error page
+
+=cut
+
+sub default :Path {
+ my ( $self, $c ) = @_;
+
+ $c->stash->{"template"} = "error-404.tt";
+ $c->res->status(404);
+}
+
+=head2 end
+
+Attempt to render a view, if needed.
+
+=cut
+
+sub end : ActionClass('RenderView') {
+ my ($self, $c) = @_;
+ my $errors = scalar @{$c->error};
+
+ if ($errors && not defined $c->stash->{"error_msg"}) {
+ $c->stash->{"template"} = "error-500.tt";
+
+ $c->stash->{"message"} = join "\n", @{$c->error};
+ $c->res->status(500);
+ $c->clear_errors;
+ }
+}
+
+=head1 AUTHOR
+
+root
+
+=head1 LICENSE
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+__PACKAGE__->meta->make_immutable;
+
+1;
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Controller/User.pm
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Controller/User.pm (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Controller/User.pm 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,158 @@
+package Test::LDAP::Controller::User;
+use Moose;
+use namespace::autoclean;
+
+BEGIN {extends 'Catalyst::Controller::HTML::FormFu'; }
+
+=head1 NAME
+
+Test::LDAP::Controller::User - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index
+
+=cut
+
+sub base :Chained('/') :PathPart('user') :CaptureArgs(0) {
+ my ($self, $c) = @_;
+}
+
+sub user :Chained('base') :PathPart('') :CaptureArgs(2) {
+ my $self = shift;
+ my $c = shift;
+
+ # Do we have an id?
+ my $noargs = undef;
+ if ($#_ != -1) {
+ foreach (@_) {
+ if ($_ =~ /^$/) { $noargs = 1 }
+ }
+ }
+
+ if ($noargs) {
+ $c->stash->{template} = "common/noarg.tt";
+ $c->detach;
+ }
+
+ my ($id, $ou) = @_;
+
+ # Store div stuff for use in templates.
+ $c->stash(
+ id => $id,
+ ou => $ou,
+ type => "User",
+ resultset => { $id => $c->model('LDAP')->user("etk") }
+ );
+
+ my $noresult = undef;
+ # Do we have any entries?
+ if ( $ou !~ /^\*$/ ) {
+ if (not defined $c->stash->{resultset}->{$id}->{$ou}) {
+ $noresult = 1;
+ } else {
+ $c->stash->{result}->{$id}->{$ou} = $c->stash->{resultset}->{$id}->{$ou}
+ }
+ } else {
+ if ($c->model('LDAP')->mesg->count == 0) {
+ $noresult = 1;
+ } else {
+ $c->stash->{result} = $c->stash->{resultset};
+ }
+ }
+
+ if ($noresult) {
+ $c->stash->{template} = "common/noresult.tt";
+ $c->detach;
+ }
+}
+
+sub view :Chained('user') :PathPart('view') :Args(0) {
+ my ($self, $c) = @_;
+
+ $c->stash->{template} = "common/results.tt"
+}
+
+sub edit :Chained('user') :PathPart('edit') :Args(0) :FormConfig {
+ my ( $self, $c ) = @_;
+
+ # Check if the loc that is specified is a wildcard, do an error if it's true
+ if ($c->stash->{ou} =~ /^\*/) {
+ $c->stash(
+ template => "error-generic.tt",
+ message => "You cannot use '*' as an OU / Location when editing a user!",
+ );
+ $c->res->status("500");
+ $c->detach
+ }
+
+ # Get the form.
+ my $form = $c->stash->{"form"};
+
+ # Get the ldap object from the loaded objects
+ my $entry = $c->stash->{result}->{ $c->stash->{id} }->{ $c->stash->{ou} };
+
+ # If the form is submitted and valid let's try to update the data
+ if ($form->submitted_and_valid) {
+ my $params = $c->req->params;
+
+ foreach my $attr ($params) {
+ $entry->replace ($attr => $params->{$attr}) if ( defined ($params->{$attr}) );
+ }
+
+ $entry->update
+ }
+
+ # Autofill the form..
+ my $options = {};
+ foreach my $attr ($entry->attributes) {
+ my $value = $entry->get_value($attr);
+ $options->{$attr} = $value;
+
+ push @{$c->stash->{attributes}}, $attr . ":" . $value . "<br />"
+ }
+
+ $form->default_values($options);
+}
+
+=head2 auto
+
+Check if the user is authenicated, if not we just forward to the login page.
+
+=cut
+sub auto :Private {
+ my ( $self, $c ) = @_;
+
+ if (!$c->user_exists) {
+ $c->log->debug('*** $c->controller::auto User not found, forwarding to auth');
+
+ $c->response->redirect( $c->uri_for( $c->controller("Auth")->action_for("index") ) );
+
+ return 0
+ }
+
+ return 1
+}
+
+
+=head1 AUTHOR
+
+root
+
+=head1 LICENSE
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+__PACKAGE__->meta->make_immutable;
+
+1;
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Model/LDAP.pm
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Model/LDAP.pm (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/Model/LDAP.pm 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,5 @@
+package Test::LDAP::Model::LDAP;
+
+use Moose;
+use namespace::autoclean;
+extends 'Catalyst::Model::LDAP::FromAuthentication';
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/View/TT.pm
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/View/TT.pm (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP/View/TT.pm 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,37 @@
+package Test::LDAP::View::TT;
+
+use strict;
+use warnings;
+
+use base 'Catalyst::View::TT';
+
+__PACKAGE__->config(
+ TEMPLATE_EXTENSION => '.tt',
+ render_die => 1,
+ WRAPPER => "default.tt"
+);
+
+=head1 NAME
+
+Test::LDAP::View::TT - TT View for Test::LDAP
+
+=head1 DESCRIPTION
+
+TT View for Test::LDAP.
+
+=head1 SEE ALSO
+
+L<Test::LDAP>
+
+=head1 AUTHOR
+
+root
+
+=head1 LICENSE
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP.pm
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP.pm (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/lib/Test/LDAP.pm 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,79 @@
+package Test::LDAP;
+use Moose;
+use namespace::autoclean;
+
+use Catalyst::Runtime 5.80;
+
+# Set flags and add plugins for the application
+#
+# -Debug: activates the debug mode for very useful log messages
+# ConfigLoader: will load the configuration from a Config::General file in the
+# application's home directory
+# Static::Simple: will serve static files from the application's root
+# directory
+
+use Catalyst qw/
+ -Debug
+ ConfigLoader
+ Static::Simple
+
+ Authentication
+ Authorization::Roles
+ Session
+ Session::State::Cookie
+ Session::Store::FastMmap
+/;
+
+extends 'Catalyst';
+
+our $VERSION = '0.01';
+$VERSION = eval $VERSION;
+
+# Configure the application.
+#
+# Note that settings in test_ldap_web.conf (or other external
+# configuration file that you set up manually) take precedence
+# over this when using ConfigLoader. Thus configuration
+# details given here can function as a default configuration,
+# with an external configuration file acting as an override for
+# local deployment.
+
+__PACKAGE__->config(
+ # Disable deprecated behavior needed by old applications
+ disable_component_resolution_regex_fallback => 1,
+
+ 'Plugin::ConfigLoader' => { file => 'config.json' },
+);
+
+# Start the application
+__PACKAGE__->setup();
+
+
+=head1 NAME
+
+Test::LDAP - Catalyst based application
+
+=head1 SYNOPSIS
+
+ script/test_ldap_web_server.pl
+
+=head1 DESCRIPTION
+
+[enter your description here]
+
+=head1 SEE ALSO
+
+L<Test::LDAP::Controller::Root>, L<Catalyst>
+
+=head1 AUTHOR
+
+root
+
+=head1 LICENSE
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/auth/index.tt
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/auth/index.tt (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/auth/index.tt 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,9 @@
+[% IF ! c.user_exists %]
+
+[% form %]
+
+[% ELSE %]
+
+<p>You are already logged in.</p>
+
+[% END %]
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/auth/login.tt
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/auth/login.tt (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/auth/login.tt 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1 @@
+Login failure
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/common/noarg.tt
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/common/noarg.tt (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/common/noarg.tt 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1 @@
+<h2>Missing ID or too short</h2>
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/common/noresult.tt
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/common/noresult.tt (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/common/noresult.tt 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1 @@
+<h2>[% type %] "[% id %]" was not found in location "[% ou %]"</h2>
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/common/results.tt
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/common/results.tt (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/common/results.tt 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,21 @@
+<h3>Results</h3>
+
+[% FOREACH var IN result.keys.sort %]
+ <!-- div pr user for example -->
+ <div class="result var">
+ <strong>Name: [% var %]</strong><br/>
+
+ <!-- div pr ou for example -->
+ [% FOREACH subvar IN result.$var.keys.sort %]
+ <div class="result subvar">
+ <strong>Location: [% subvar FILTER ucfirst %]</strong><br />
+
+ [% FOREACH attr IN result.$var.$subvar.attributes.sort %]
+ [% value = result.$var.$subvar.get_value(attr).join(", ") %]
+ <span class="result subvark">[% attr %]:</span> [% value %]<br />
+ [% END %]
+ </div>
+ [% END %]
+
+ </div>
+[% END %]
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/default.tt
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/default.tt (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/default.tt 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Test LDAP - BETA</title>
+ <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" title="no title" charset="utf-8">
+</head>
+
+<body id="body">
+<div id="container">
+
+<div id="header">
+<h1>Test LDAP - BETA</h1>
+<img id='powered' src="/static/images/btn_88x31_built.png"/>
+<div id="navbar">
+ <a href="[% c.uri_for('/') %]">Home</a>
+ [% IF c.user_exists %]
+ <a href="[% c.uri_for('/search') %]">Search</a>
+ <a href="[% c.uri_for('/auth/logout') %]">Logout</a>
+ [% ELSE %]
+ <a href="[% c.uri_for('/auth') %]">Login</a>
+ [% END %]
+</div>
+</div>
+
+<div id="content">
+[% IF message %]
+<div class="messageblock">[% message %]</div>
+[% END %]
+[% content %]
+</div>
+
+</div>
+</body>
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/error-404.tt
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/error-404.tt (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/error-404.tt 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1 @@
+<p> Error, page you requested was not found.</p>
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/error-500.tt
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/error-500.tt (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/error-500.tt 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,3 @@
+<p>
+Error, server encountered an internal error. See above for error message.
+</p>
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/favicon.ico
===================================================================
(Binary files differ)
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/favicon.ico
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/auth/index.json
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/auth/index.json (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/auth/index.json 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,22 @@
+{
+ "action" : "/auth/login",
+ "elements" : [
+ {
+ "name" : "username",
+ "type" : "Text",
+ "label" : "Username",
+ "constraints" : "Required"
+ },
+ {
+ "name" : "password",
+ "type" : "Password",
+ "label" : "Password",
+ "constraints" : "Required"
+ },
+ {
+ "name" : "submit",
+ "type" : "Submit",
+ "value" : "Login"
+ }
+ ]
+}
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/search/index.json
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/search/index.json (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/search/index.json 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,72 @@
+{
+ "action" : "/search/results",
+
+ "indicator" : "Submit",
+
+ "elements" : [
+ {
+ "name" : "search",
+ "type" : "Text",
+ "label" : "Search",
+ "constraints" : "Required",
+
+ "auto_label" : "text search label",
+
+ "attributes" : {
+ "title" : "Enter something to search for"
+ }
+ },
+
+ {
+ "name" : "submit",
+ "type" : "Submit",
+ "value" : "Submit",
+
+ "attributes" : {
+ "title" : "Submit"
+ }
+ },
+
+ {
+ // OU's are gotten automagically from the LDAP Server
+ // All of them are automatically selected.
+ "name" : "ous",
+ "type" : "Select",
+ "label" : "Location",
+ "multiple" : 1,
+ "size" : 10
+ },
+
+ {
+ "name" : "type",
+ "type" : "Radiogroup",
+ "options" : [
+ // Search up users
+ {
+ "value" : "id",
+ "label" : "ID",
+ "attributes" : { "checked" : "checked"}
+ },
+
+ // Common name
+ [ "cn", "Common Name" ],
+
+ // UID nr
+ [ "uid", "UID Number" ],
+
+ // Groups
+ [ "groups", "List All groups" ],
+
+ // Users
+ [ "users", "List All users" ],
+
+ // Groups for id
+ [ "id_groups", "Groups for ID" ],
+
+ // Groups
+ [ "group", "Groups" ]
+ ]
+ }
+
+ ]
+}
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/user/edit.json
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/user/edit.json (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/forms/user/edit.json 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,41 @@
+{
+ "indicator" : "submit",
+
+ "elements" : [
+ {
+ "name" : "cn",
+ "type" : "Text",
+ "label" : "Common Name",
+ "constraints" : "Required"
+ },
+ /* disabled for now{
+ "name" : "description",
+ "type" : "Text",
+ "label" : "Description"
+ //"constraints" : "Required"
+ },*/
+ {
+ "name" : "gecos",
+ "type" : "Text",
+ "label" : "Gecos",
+ "constraints" : "Required"
+ },
+ {
+ "name" : "gidNumber",
+ "type" : "Text",
+ "label" : "Group Id Number",
+ "constraints" : [ "Required", "Integer" ]
+ },
+ {
+ "name" : "loginShell",
+ "type" : "Text",
+ "label" : "Login Shell",
+ "constraints" : "Required"
+ },
+ {
+ "name" : "submit",
+ "type" : "Submit",
+ "value" : "Submit"
+ }
+ ]
+}
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/index.tt
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/index.tt (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/index.tt 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,7 @@
+<p>Add links here later / documentation?</p>
+
+[% IF ! c.user_exists %]
+Please login
+[% ELSE %]
+
+[% END %]
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/css/style.css
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/css/style.css (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/css/style.css 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,100 @@
+body {
+ margin: 0px;
+ padding: 0px;
+ font-family: arial;
+}
+
+#container{
+ width: 990px;
+ margin-left: auto;
+ margin-right: auto;
+ margin-top: 20px;
+ background: #fff;
+ position:relative;
+ overflow:hidden;
+}
+
+#header {
+ background-color: #990000;
+ color: #ffffff;
+ margin: 0px;
+ padding: 1px;
+ border-bottom: 3px solid red;
+ height: 100px;
+ width: 100%;
+}
+#header h1 {
+ padding: 5px;
+}
+
+
+#navbar {
+ position: absolute;
+ background-color: #660000;
+ border-top: 1px solid white;
+ top: 74px;
+ height: 24px;
+ width: 100%;
+}
+#navbar a {
+ color: white;
+ padding-left: 10px;
+ padding-right: 10px;
+ text-decoration: none;
+ font-weight: bold;
+ font-size: 16px;
+}
+#navbar a:hover {
+ background-color: #330000;
+}
+
+
+#powered {
+ position: absolute;
+ top: 20px;
+ left: 600px;
+}
+#content {
+ background-color: #dddddd;
+ color: black;
+ padding: 5px;
+ padding-top: 20px;
+}
+
+.messageblock {
+ background-color: #dddddd;
+ margin: 20px;
+ padding: 10px;
+ border: 1px solid #009900;
+ width: 500px;
+ font-size: 1.2em;
+}
+
+.form {
+ margin:0 auto;
+ width:400px;
+ padding:14px;
+}
+
+
+
+.result.var {
+ width: 99%;
+ padding: 1px;
+ border:1px dashed #660000;;
+}
+
+.result.subvar {
+ width:98%;
+ border:1px dotted white;
+ padding:5px;
+ margin-bottom:5px;
+}
+
+.result.subvark{
+ font-style: italic;
+ font-weight: bold;
+}
+
+.result.subvarv {
+}
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_120x50_built.png
===================================================================
(Binary files differ)
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_120x50_built.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_120x50_built_shadow.png
===================================================================
(Binary files differ)
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_120x50_built_shadow.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_120x50_powered.png
===================================================================
(Binary files differ)
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_120x50_powered.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_120x50_powered_shadow.png
===================================================================
(Binary files differ)
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_120x50_powered_shadow.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_88x31_built.png
===================================================================
(Binary files differ)
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_88x31_built.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_88x31_built_shadow.png
===================================================================
(Binary files differ)
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_88x31_built_shadow.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_88x31_powered.png
===================================================================
(Binary files differ)
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_88x31_powered.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_88x31_powered_shadow.png
===================================================================
(Binary files differ)
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/btn_88x31_powered_shadow.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/catalyst_logo.png
===================================================================
(Binary files differ)
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/static/images/catalyst_logo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/user/edit.tt
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/user/edit.tt (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/root/user/edit.tt 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,3 @@
+<h3>Editing user "[% id %]" in location "[% ou FILTER ucfirst %]"</h3>
+[% test %]
+[% form %]
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_cgi.pl
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_cgi.pl (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_cgi.pl 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,30 @@
+#!/usr/bin/env perl
+
+use Catalyst::ScriptRunner;
+Catalyst::ScriptRunner->run('Test::LDAP', 'CGI');
+
+1;
+
+=head1 NAME
+
+test_ldap_cgi.pl - Catalyst CGI
+
+=head1 SYNOPSIS
+
+See L<Catalyst::Manual>
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as a cgi script.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_cgi.pl
___________________________________________________________________
Added: svn:executable
+ *
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_create.pl
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_create.pl (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_create.pl 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,60 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+use Catalyst::ScriptRunner;
+Catalyst::ScriptRunner->run('Test::LDAP', 'Create');
+
+1;
+
+=head1 NAME
+
+test_ldap_create.pl - Create a new Catalyst Component
+
+=head1 SYNOPSIS
+
+test_ldap_create.pl [options] model|view|controller name [helper] [options]
+
+ Options:
+ --force don't create a .new file where a file to be created exists
+ --mechanize use Test::WWW::Mechanize::Catalyst for tests if available
+ --help display this help and exits
+
+ Examples:
+ test_ldap_create.pl controller My::Controller
+ test_ldap_create.pl -mechanize controller My::Controller
+ test_ldap_create.pl view My::View
+ test_ldap_create.pl view HTML TT
+ test_ldap_create.pl model My::Model
+ test_ldap_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\
+ dbi:SQLite:/tmp/my.db
+ test_ldap_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\
+ [Loader opts like db_schema, naming] dbi:Pg:dbname=foo root 4321
+ [connect_info opts like quote_char, name_sep]
+
+ See also:
+ perldoc Catalyst::Manual
+ perldoc Catalyst::Manual::Intro
+ perldoc Catalyst::Helper::Model::DBIC::Schema
+ perldoc Catalyst::Model::DBIC::Schema
+ perldoc Catalyst::View::TT
+
+=head1 DESCRIPTION
+
+Create a new Catalyst Component.
+
+Existing component files are not overwritten. If any of the component files
+to be created already exist the file will be written with a '.new' suffix.
+This behavior can be suppressed with the C<-force> option.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_create.pl
___________________________________________________________________
Added: svn:executable
+ *
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_fastcgi.pl
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_fastcgi.pl (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_fastcgi.pl 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,47 @@
+#!/usr/bin/env perl
+
+use Catalyst::ScriptRunner;
+Catalyst::ScriptRunner->run('Test::LDAP', 'FastCGI');
+
+1;
+
+=head1 NAME
+
+test_ldap_fastcgi.pl - Catalyst FastCGI
+
+=head1 SYNOPSIS
+
+test_ldap_fastcgi.pl [options]
+
+ Options:
+ -? -help display this help and exits
+ -l --listen Socket path to listen on
+ (defaults to standard input)
+ can be HOST:PORT, :PORT or a
+ filesystem path
+ -n --nproc specify number of processes to keep
+ to serve requests (defaults to 1,
+ requires -listen)
+ -p --pidfile specify filename for pid file
+ (requires -listen)
+ -d --daemon daemonize (requires -listen)
+ -M --manager specify alternate process manager
+ (FCGI::ProcManager sub-class)
+ or empty string to disable
+ -e --keeperr send error messages to STDOUT, not
+ to the webserver
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as fastcgi.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_fastcgi.pl
___________________________________________________________________
Added: svn:executable
+ *
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_server.pl
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_server.pl (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_server.pl 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,60 @@
+#!/usr/bin/env perl
+
+BEGIN {
+ $ENV{CATALYST_SCRIPT_GEN} = 40;
+}
+
+use Catalyst::ScriptRunner;
+Catalyst::ScriptRunner->run('Test::LDAP', 'Server');
+
+1;
+
+=head1 NAME
+
+test_ldap_server.pl - Catalyst Test Server
+
+=head1 SYNOPSIS
+
+test_ldap_server.pl [options]
+
+ -d --debug force debug mode
+ -f --fork handle each request in a new process
+ (defaults to false)
+ -? --help display this help and exits
+ -h --host host (defaults to all)
+ -p --port port (defaults to 3000)
+ -k --keepalive enable keep-alive connections
+ -r --restart restart when files get modified
+ (defaults to false)
+ -rd --restart_delay delay between file checks
+ (ignored if you have Linux::Inotify2 installed)
+ -rr --restart_regex regex match files that trigger
+ a restart when modified
+ (defaults to '\.yml$|\.yaml$|\.conf|\.pm$')
+ --restart_directory the directory to search for
+ modified files, can be set mulitple times
+ (defaults to '[SCRIPT_DIR]/..')
+ --follow_symlinks follow symlinks in search directories
+ (defaults to false. this is a no-op on Win32)
+ --background run the process in the background
+ --pidfile specify filename for pid file
+
+ See also:
+ perldoc Catalyst::Manual
+ perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst Testserver for this application.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_server.pl
___________________________________________________________________
Added: svn:executable
+ *
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_test.pl
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_test.pl (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_test.pl 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,40 @@
+#!/usr/bin/env perl
+
+use Catalyst::ScriptRunner;
+Catalyst::ScriptRunner->run('Test::LDAP', 'Test');
+
+1;
+
+=head1 NAME
+
+test_ldap_test.pl - Catalyst Test
+
+=head1 SYNOPSIS
+
+test_ldap_test.pl [options] uri
+
+ Options:
+ --help display this help and exits
+
+ Examples:
+ test_ldap_test.pl http://localhost/some_action
+ test_ldap_test.pl /some_action
+
+ See also:
+ perldoc Catalyst::Manual
+ perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst action from the command line.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Property changes on: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/script/test_ldap_test.pl
___________________________________________________________________
Added: svn:executable
+ *
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/01app.t
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/01app.t (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/01app.t 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,10 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+BEGIN { use_ok 'Catalyst::Test', 'Test::LDAP' }
+
+ok( request('/')->is_success, 'Request should succeed' );
+
+done_testing();
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/02pod.t
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/02pod.t (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/02pod.t 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,10 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+eval "use Test::Pod 1.14";
+plan skip_all => 'Test::Pod 1.14 required' if $@;
+
+all_pod_files_ok();
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/03podcoverage.t
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/03podcoverage.t (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/03podcoverage.t 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,14 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
+
+eval "use Pod::Coverage 0.20";
+plan skip_all => 'Pod::Coverage 0.20 required' if $@;
+
+all_pod_coverage_ok();
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/controller_Auth.t
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/controller_Auth.t (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/controller_Auth.t 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+BEGIN { use_ok 'Catalyst::Test', 'Test::LDAP' }
+BEGIN { use_ok 'Test::LDAP::Controller::Auth' }
+
+ok( request('/auth')->is_success, 'Request should succeed' );
+done_testing();
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/controller_User.t
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/controller_User.t (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/controller_User.t 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+BEGIN { use_ok 'Catalyst::Test', 'Test::LDAP' }
+BEGIN { use_ok 'Test::LDAP::Controller::User' }
+
+ok( request('/user')->is_success, 'Request should succeed' );
+done_testing();
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/ldap_client.t
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/ldap_client.t (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/ldap_client.t 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,16 @@
+use strict;
+use warnings;
+use Test::More qw(no_plan);
+use Test::LDAP::Client;
+
+my $server = "ldap.test.no";
+
+ok(
+ my $slc = Test::LDAP::Client->new( "host" => $server ),
+ 'Created new ok towards ' . $server
+);
+
+ok(
+ $slc->ous,
+ "Getting Ous ok"
+);
Added: Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/view_TT.t
===================================================================
--- Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/view_TT.t (rev 0)
+++ Catalyst-Authentication-Store-LDAP/branches/fix_connect_as_user_with_session/Test-Session-Broken/t/view_TT.t 2010-08-16 11:39:11 UTC (rev 13487)
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+use Test::More;
+
+BEGIN { use_ok 'Test::LDAP::View::TT' }
+
+done_testing();
More information about the Catalyst-commits
mailing list