Re: [Catalyst] Plugin::Authentication overrides $c-req-user

2009-02-11 Thread Rodrigo
On Tue, Feb 10, 2009 at 9:46 PM, Daniel Westermann-Clark d...@pobox.comwrote:

 Hi,

 At work we use, among other things, the value of REMOTE_USER in the
 request environment to authenticate users using our single-sign on
 system.  We access this via $c-req-user, which the various engines
 set using the data available to them.

 However, Catalyst::Plugin::Authentication-set_authenticate overrides
 this value with the blessed user object in addition to setting
 $c-user.  Looking at the commit logs, it looks like this has been
 true since 2005 but I'm having a hard time finding a reason why.

 Also, Catalyst::Request lists $c-req-user as deprecated.  If it were
 to be removed, how would one access the value in an engine-agnostic
 way?


I'm not familiar with $c-req-user, but isn't REMOTE_USER a header you can
read with $c-req-header('remote_user'), or whatever header name is being
passed around?
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Re: loading data types from Oracle DB with DBIx::Class::Schema::Loader

2009-02-11 Thread Karl Forner
I believe I fixed the problem (cf my post bug found in and tentatively
fixed in DBIx::Class::Schema::Loader::DBI::Oracle::_tables_list in the dbix
mailing list).

Here's a copy :

 We had a problem because DBIx::Class::Schema::Loader did not get the
 column_info for our Oracle database : no data_types, is_nullable, default
 etc.. attributes were set.
 We traced the problem down to 
 DBIx::Class::Schema::Loader::DBI::Oracle::_tables_list,
 that changed the table names to lowercase.

 So just commenting the line  69 : $table = lc $table;
 seems to fix the problem.

 The test is either to call the _tables_list and check the table names,
 or to create a schema on a n oracle db using
 DBIx::Class::Schema::Loader::make_schema_at, and to check that the generated
 DBIx::Class objects have
 the column attributes such asdata_type,  default_value , is_nullable ,
 size etc...


 Here are some details:
 DBIx::Class::Schema::Loader $VERSION = '0.04004'
  perl, v5.8.8 built for i486-linux-gnu-thread-multi

 diff:
 --- Oracle.pm2009-02-11 13:35:08.0 +0100
 +++ Oracle.pm.fixed2009-02-11 13:35:04.0 +0100
 @@ -66,7 +66,7 @@
  $table =~ s/\w+\.//;

  next if $table eq 'PLAN_TABLE';
 -$table = lc $table;
 +# $table = lc $table; # removed by kf
  push @tables, $1
if $table =~ /\A(\w+)\z/;
  }

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] [OT]? Extends TheSchwartz

2009-02-11 Thread Lindolfo Lorn Rodrigues
Hi, sorry for the off-topic but i'm search at google and the uniq list that
i found ( http://groups.google.com/group/theschwartz ) dont have nothing.
I need a something like TheSchwartz::Scheduler, i was thinking in change
TheSchwartz-work method, they will look the time to run a job  and execute
the job only when is the rigth time
Does anyone have some tips? I looked at CPAN but dont find anything like
this.

Thanks.

-- 
--Lindolfo Lorn Rodrigues
www.slackwarezine.com.br
http://lornlab.org
http://sao-paulo.pm.org
use Catalyst;
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Plugin::Authentication overrides $c-req-user

2009-02-11 Thread Daniel Westermann-Clark
On 2009-02-11 10:06:42 +0100, Rodrigo wrote:
 I'm not familiar with $c-req-user, but isn't REMOTE_USER a header
 you can read with $c-req-header('remote_user'), or whatever header
 name is being passed around?

Some authentication schemes might provide headers containing the
username, but REMOTE_USER is different.  It's not available as a
header.

Regardless, is there a reason it should be a string at first and then
an object?  It's inconsistent and causes a loss of information about
the request.

If no one is using this behavior, I'd be happy to provide patches to
deprecate or remove it.

-- 
Daniel Westermann-Clark

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Plugin::Authentication overrides $c-req-user

2009-02-11 Thread Peter Karman
Daniel Westermann-Clark wrote on 02/11/2009 02:53 PM:
 On 2009-02-11 10:06:42 +0100, Rodrigo wrote:
 I'm not familiar with $c-req-user, but isn't REMOTE_USER a header
 you can read with $c-req-header('remote_user'), or whatever header
 name is being passed around?
 
 Some authentication schemes might provide headers containing the
 username, but REMOTE_USER is different.  It's not available as a
 header.
 
 Regardless, is there a reason it should be a string at first and then
 an object?  It's inconsistent and causes a loss of information about
 the request.
 
 If no one is using this behavior, I'd be happy to provide patches to
 deprecate or remove it.
 

Why not just add a remote_user() method on $c-req instead? It's a
little more typing, but is more explicit about where the value comes
from and doesn't potentially break any existing apps.

-- 
Peter Karman  .  pe...@peknet.com  .  http://peknet.com/


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Plugin::Authentication overrides $c-req-user

2009-02-11 Thread Tomas Doran


On 11 Feb 2009, at 21:37, Peter Karman wrote:


Daniel Westermann-Clark wrote on 02/11/2009 02:53 PM:

If no one is using this behavior, I'd be happy to provide patches to
deprecate or remove it.


Why not just add a remote_user() method on $c-req instead? It's a
little more typing, but is more explicit about where the value comes
from and doesn't potentially break any existing apps.



+1 for remote_user

Catalyst::Request's user method has been marked as deprecated in the  
docs since 2006 please make calling it issue a warning once per- 
request, so that it can killed outright some time in the future.


Patches on 5.80 welcome :)

Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] HTML::FormFu form elements

2009-02-11 Thread Greg Coates
I've run into a scenario where I need to be able to build an 
HTML::FormFu form and then only display portions of it in my template. 
(So, the typical [% form %] in the template will be replaced by 
something else, at least in my ideal world.)


I tried doing this in the template:
[% form.get_element('name' = 'element_name') %]

I didn't get an error, but it didn't display.

Does anyone know if what I'm trying to do is possible, and if so, how to 
do it?


Thanks,
Greg Coates

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] HTML::FormFu form elements

2009-02-11 Thread Octavian Rasnita
From: Greg Coates gcoa...@csuchico.edu
 I've run into a scenario where I need to be able to build an 
 HTML::FormFu form and then only display portions of it in my template. 
 (So, the typical [% form %] in the template will be replaced by 
 something else, at least in my ideal world.)
 
 I tried doing this in the template:
 [% form.get_element('name' = 'element_name') %]
 
 I didn't get an error, but it didn't display.
 
 Does anyone know if what I'm trying to do is possible, and if so, how to 
 do it?
 
 Thanks,
 Greg Coates

Can't you just split the form configuration file in more files, and create 
another configuration file that loads all those parts?

When you will need the entire form you could load the form configuration file 
that loads all the parts, and when you need just a part of the form, you could 
load the configuration file that contains that part only.

Octavian


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/