Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

jifty::plugin::authzldap(3pm) [debian man page]

Jifty::Plugin::AuthzLDAP(3pm)				User Contributed Perl Documentation			     Jifty::Plugin::AuthzLDAP(3pm)

NAME
Jifty::Plugin::AuthzLDAP - Jifty plugin to a add dynamic ldap authorization DESCRIPTION
Jifty plugin. Provide ldap authorization with filters table and cache. CONFIGURATION NOTES
in etc/config.yml Plugins: - AuthzLDAP: LDAPbind: cn=testldap,ou=admins,dc=myorg,dc=org # LDAPpass: test # password LDAPhost: ldap.myorg.org # ldap host LDAPbase: ou=people,dc=myorg.. # ldap base LDAPuid: uid # optional CacheTimout: 20 # minutes, optional, default 20 minutes in application create a LDAPFilter model use base qw/Jifty::Plugin::AuthzLDAP::Model::LDAPFilter/; in LDAPFilter model create your filters, something like name |filter |is_group is_admin|(!eduPersonAffiliation=STUDENT)|0 in_admin|cn=admin,ou=groups,dc=my.org |1 to protect access to /admin in "TestApp" application create a lib/TestApp/Dispatcher.pm use strict; use warnings; package TestApp::Dispatcher; use Jifty::Dispatcher -base; before '/admin/*' => run { # Authentication Jifty->web->tangent(url => '/login') if (! Jifty->web->current_user->id); # Authorization my $user = Jifty->web->current_user->user_object->name; Jifty->web->tangent(url => '/error/AccessDenied') if (! Jifty::Plugin::AuthzLDAP->ldapvalidate($user,'is_admin') ); }; 1 SEE ALSO
Net::LDAP METHODS
init load config parameters, connect to ldap, create memory cache BASE CACHE DN LDAP BASE UID PASS LDAPFilterClass accesors to conf parametres bind Bind to ldap ldapvalidate NAME FILTERNAME return 1 if NAME validate FILTER or NAME-FILTERNAME in cache else return 0 If FILTERNAME is flagged as is_group, search if user is uniquemember of this group as supported by the Netscape Directory Server AUTHOR
Yves Agostini, <yvesago@cpan.org> LICENSE
Copyright 2007-2009 Yves Agostini. All Rights Reserved. This program is free software and may be modified and distributed under the same terms as Perl itself. perl v5.10.0 2009-05-15 Jifty::Plugin::AuthzLDAP(3pm)

Check Out this Related Man Page

Jifty::Plugin::Comment::Mixin::Model::Commented(3pm)	User Contributed Perl Documentation   Jifty::Plugin::Comment::Mixin::Model::Commented(3pm)

NAME
Jifty::Plugin::Comment::Mixin::Model::Commented - add comments to a model SYNOPSIS
package App::Model::Fooble; use Jifty::DBI::Schema; use App::Record schema { column scribble => type is 'text'; column wobble => type is 'int'; }; use Jifty::Plugin::Comment::Mixin::Model::Commented; DESCRIPTION
Add this mixin to a model if you'd like to attach comments to it. Comments can be used to allow users of your system to comment upon and discuss the record to which they are attached. METHODS
import This method performs some rather devious magic to make everything work easily. It automatically generates an additional model for your application. This model will look something like this: use strict; use warnings; package App::Model::FoobleComment; use Jifty::DBI::Schema; use Jifty::Record schema { column commented_upon => references App::Model::Fooble, label is 'Commented upon', is mandatory, is immutable, ; column the_comment => references App::Model::Comment, label is 'Comment', is mandatory, is immutable, is distinct, ; }; App::Model::FoobleComment->add_trigger( before_access => sub { my $self = shift; my ($right, %args) = @_; if ($right eq 'create') { return 'allow' if $self->current_user->id; } if ($right eq 'read') { return 'allow'; } return $self->App::Model::FoobleComment::current_user_can(@_); }); You will need to define an "before_access" trigger for this class if you want it to be useful. for_commenting Returns a value to be used with the comment views. It's basically just a string identifying the class name and ID of the record. comments Returns a collection of Jifty::Plugin::Comment::Model::Comment objects that have been attached to the current record. (Actually, it returns the a collection of the local application class, e.g. "App::Model::CommentCollection".) comment_record_class This is the name of the linking class that was created during "import". AUTHOR
Andrew Sterling Hanenkamp "<hanenkamp@cpan.com>" COPYRIGHT AND LICENSE
Copyright 2007 Boomer Consulting, Inc. All Rights Reserved. This program is free software and may be modified and distributed under the same terms as Perl itself. perl v5.12.4 2009-03-09 Jifty::Plugin::Comment::Mixin::Model::Commented(3pm)
Man Page