Re: [Catalyst] Spending time with Catalyst (slightly OT)
Kaare Rasmussen ha scritto: http://cms.wikia.com/wiki/JavaScript_Libraries Please fill in the other libraries that I missed. Perhaps this can be of help to some people: http://www.infoworld.com/article/06/07/31/31FEajax_1.html?s=feature That was interesting. Thank you. -- Marcello Romani Responsabile IT Ottotecnica s.r.l. http://www.ottotecnica.com ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Advice for Catalyst::Plugin::Authent ication::Store::DBIC needed
[EMAIL PROTECTED] wrote: What you need to do is subclass C::P::A::Credential, and override the login() method. The login method is where the username and password are checked, so you probably want to do something like the following (probably borrowing the password check form C::P::Authentication::CDBI): It works. But is not a trivial thing, because it requires knowledge of the - quite complex - Catalyst authentication code. So may I place a feature request to the author(s): Offer a possibility to add custom check code to the login() method. Example: $c-login($username, $password, {post_check = \check_status}) =head2 check_status Callback function for login() to do further custom checks. Receives context object and user object as arguments. Checks user status field to equal active. On success this function must return without any value. On failure returns a string describing why login fails. =cut sub check_status { my ($c, $user) = @_; return if $user-status eq 'active'; return 'user status is not active'; } -- Bernhard Graf ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Advice for Catalyst::Plugin::Authentication::Store::DBIC needed
Bernhard Graf wrote: [EMAIL PROTECTED] wrote: What you need to do is subclass C::P::A::Credential, and override the login() method. The login method is where the username and password are checked, so you probably want to do something like the following (probably borrowing the password check form C::P::Authentication::CDBI): It works. But is not a trivial thing, because it requires knowledge of the - quite complex - Catalyst authentication code. So may I place a feature request to the author(s): Offer a possibility to add custom check code to the login() method. Example: $c-login($username, $password, {post_check = \check_status}) =head2 check_status Callback function for login() to do further custom checks. Receives context object and user object as arguments. Checks user status field to equal active. On success this function must return without any value. On failure returns a string describing why login fails. =cut sub check_status { my ($c, $user) = @_; return if $user-status eq 'active'; return 'user status is not active'; } This looks more like an authorization check than an authentication check to me, since the purpose of authentication is just to establish an identity, while it is the purpose of authorization to determine if that identity is allowed to proceed (in your case, the identity is not allowed to do anything if it is not active). So it would make more sense to me to setup an active role and then check for it with the C::P::Authz::Roles plugin ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Advice for Catalyst::Plugin::Authentication::Store::DBIC needed
Bernhard Graf [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: What you need to do is subclass C::P::A::Credential, and override the login() method. The login method is where the username and password are checked, so you probably want to do something like the following (probably borrowing the password check form C::P::Authentication::CDBI): It works. But is not a trivial thing, because it requires knowledge of the - quite complex - Catalyst authentication code. Or you could use the code I included, which is not some pseudo-code I made up to make a point, but the very same code I run in one of my cat apps. All you have to do is fill in the status check where I indicated, and you should have working code. Len. -- Leonard A. Jaffe (614)213-4283 JP Morgan Chase, Columbus, OH DSS Monitoring Instrumentation Services [EMAIL PROTECTED] This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Configuring Catalyst::Model::DBIC::Schema from YAML
I'll put it in Catalyst svn and fix anything obvious, if you want, but since I don't actually use the module, I don't want to commit to maintaining it long term. Hopefully a user will step forward to maintain it, but if not, I'll deal with it for now. Do you keep it in svn, or do you use some other RCS? I would prefer to import the whole change history, if possible (never know when you need to go back to an older version for whatever reason). Regards, Jonathan Rockway Jonas Alves wrote: Hi, I can apply the patch, but i don't use the MicroMason view anymore. Someone want to maintain it? -- package JAPH;use Catalyst qw/-Debug/;($;=JAPH)-config(name = do { $,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //, ;$;]-[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;-setup; ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Configuring Catalyst::Model::DBIC::Schema from YAML
On 05/10/06, Jonathan Rockway [EMAIL PROTECTED] wrote: I'll put it in Catalyst svn and fix anything obvious, if you want, but since I don't actually use the module, I don't want to commit to maintaining it long term. Hopefully a user will step forward to maintain it, but if not, I'll deal with it for now. Do you keep it in svn, or do you use some other RCS? I would prefer to import the whole change history, if possible (never know when you need to go back to an older version for whatever reason). No Jonathan, i don't have the MicroMason view in any RCS. Was a very small module that didn't use very much. Putting it in the Catalyst svn is a great idea. Thanks very much. I can make a new release with the bug fix after that. Or i can give you PAUSE access to the module. -- Jonas ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/