Update of /cvsroot/openinteract/OpenInteract2/pkg/base_group/OpenInteract2/App
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27837/base_group/OpenInteract2/App
Added Files:
BaseGroup.pm
Log Message:
OIN-72: move all docs to ::App class
--- NEW FILE: BaseGroup.pm ---
package OpenInteract2::App::BaseGroup;
use strict;
use base qw( Exporter OpenInteract2::App );
use OpenInteract2::Manage;
$OpenInteract2::App::BaseGroup::VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/);
@OpenInteract2::App::BaseGroup::EXPORT = qw( install );
sub get_brick_name {
return 'base_group';
}
# Not a method, just an exported sub
sub install {
my ( $website_dir ) = @_;
my $manage = OpenInteract2::Manage->new( 'install_package' );
$manage->param( website_dir => $website_dir );
$manage->param( package_class => __PACKAGE__ );
return $manage->execute;
}
__END__
=pod
=head1 NAME
OpenInteract2::App::BaseGroup - A package to represent and process simple group records within OpenInteract
=head1 SYNOPSIS
my $groups = CTX->request->auth_group;
foreach my $group ( @{ $groups } ) {
my $users = $group->user;
print "Group: ", $group->name, "\n";
"Has: ", join( ", ", map { $_->{login_name} } @{ $users } );
}
=head1 DESCRIPTION
This package contains the 'group' object used for
authentication. Every user in the system can belong to multiple
groups, and the main use of groups is for security. You can assign
security permissions for individual objects, types of objects and
actions.
=head1 OBJECTS
B<group>
The object representing a group in OpenInteract2. It's very simple,
with just an ID, name and notes. But it can fetch its members with a
call to 'user', using a linking table to form the many-to-many
relationship.
=head1 ACTIONS
B<group>
Action for listing, creating, editing and removing groups.
=head1 RULESETS
No rulesets created by this package.
=head1 SEE ALSO
L<OpenInteract2::App::BaseUser> package
L<SPOPS::Secure|SPOPS::Secure>
L<SPOPS::Manual::Security|SPOPS::Manual::Security>
=head1 AUTHORS
Chris Winters E<lt>ch...@cw...E<gt>
=cut
|