Missing session variables, reworked some wording on old POD.
Added POD to two more files.
This commit is contained in:
parent
dc204428f6
commit
0621fd4492
6 changed files with 146 additions and 71 deletions
|
|
@ -31,7 +31,7 @@ Utility routine for creating the AdminConsole for DatabaseLink functions.
|
||||||
|
|
||||||
=head3 $session
|
=head3 $session
|
||||||
|
|
||||||
The current WebGUI session variable.
|
The current WebGUI session object.
|
||||||
|
|
||||||
=head3 $workarea
|
=head3 $workarea
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,43 @@ use WebGUI::International;
|
||||||
use WebGUI::Paginator;
|
use WebGUI::Paginator;
|
||||||
use WebGUI::SQL;
|
use WebGUI::SQL;
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
Package WebGUI::Operation::LDAPLink
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Operational handler for creating, managing and deleting LDAP Links. Only users
|
||||||
|
in group Admin (3) are allowed to execute subroutines in this package.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 _submenu ( $session, $workarea, $title, $help )
|
||||||
|
|
||||||
|
Utility routine for creating the AdminConsole for LDAPLink functions.
|
||||||
|
|
||||||
|
=head3 $session
|
||||||
|
|
||||||
|
The current WebGUI session object.
|
||||||
|
|
||||||
|
=head3 $workarea
|
||||||
|
|
||||||
|
The content to display to the user.
|
||||||
|
|
||||||
|
=head3 $title
|
||||||
|
|
||||||
|
The title of the Admin Console. This should be an entry in the i18n
|
||||||
|
table in the WebGUI namespace.
|
||||||
|
|
||||||
|
=head3 $help
|
||||||
|
|
||||||
|
An entry in the Help system in the WebGUI namespace. This will be shown
|
||||||
|
as a link to the user.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub _submenu {
|
sub _submenu {
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
my $workarea = shift;
|
my $workarea = shift;
|
||||||
|
|
@ -45,6 +81,14 @@ sub _submenu {
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
=head2 www_copyLDAPLink ( $session )
|
||||||
|
|
||||||
|
Copies the requested LDAP link in the form variable C<llid>. Adds the words
|
||||||
|
"Copy of" to the link name.
|
||||||
|
Returns the user to the List LDAP Links screen.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub www_copyLDAPLink {
|
sub www_copyLDAPLink {
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
return $session->privilege->insufficient unless ($session->user->isInGroup(3));
|
return $session->privilege->insufficient unless ($session->user->isInGroup(3));
|
||||||
|
|
@ -55,19 +99,34 @@ sub www_copyLDAPLink {
|
||||||
$db{ldapLinkName} = "Copy of ".$db{ldapLinkName};
|
$db{ldapLinkName} = "Copy of ".$db{ldapLinkName};
|
||||||
$session->db->setRow("ldapLink","ldapLinkId",\%db);
|
$session->db->setRow("ldapLink","ldapLinkId",\%db);
|
||||||
$session->form->process("op") = "listLDAPLinks";
|
$session->form->process("op") = "listLDAPLinks";
|
||||||
return www_listLDAPLinks();
|
return www_listLDAPLinks($session);
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 www_deleteLDAPLink ( $session )
|
||||||
|
|
||||||
|
Deletes the requested LDAP Link in the form variable C<llid>. Returns the user to the List LDAP Links screen.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub www_deleteLDAPLink {
|
sub www_deleteLDAPLink {
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
return $session->privilege->insufficient unless ($session->user->isInGroup(3));
|
return $session->privilege->insufficient unless ($session->user->isInGroup(3));
|
||||||
$session->db->write("delete from ldapLink where ldapLinkId=".$session->db->quote($session->form->process("llid")));
|
$session->db->write("delete from ldapLink where ldapLinkId=".$session->db->quote($session->form->process("llid")));
|
||||||
$session->form->process("op") = "listLDAPLinks";
|
$session->form->process("op") = "listLDAPLinks";
|
||||||
return www_listLDAPLinks();
|
return www_listLDAPLinks($session);
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 www_editLDAPLink ( $session )
|
||||||
|
|
||||||
|
Creates a new LDAPLink or edits the LDAPLink defined by form variable C<llid>.
|
||||||
|
Calls www_editLDAPLinkSave when done.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub www_editLDAPLink {
|
sub www_editLDAPLink {
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
return $session->privilege->insufficient unless ($session->user->isInGroup(3));
|
return $session->privilege->insufficient unless ($session->user->isInGroup(3));
|
||||||
|
|
@ -181,6 +240,14 @@ sub www_editLDAPLink {
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 www_editLDAPLinkSave ( $session )
|
||||||
|
|
||||||
|
Form post processor for www_editLDAPLink.
|
||||||
|
Returns the user to www_listLDAPLinks when done.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub www_editLDAPLinkSave {
|
sub www_editLDAPLinkSave {
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
return $session->privilege->insufficient unless ($session->user->isInGroup(3));
|
return $session->privilege->insufficient unless ($session->user->isInGroup(3));
|
||||||
|
|
@ -203,10 +270,18 @@ sub www_editLDAPLinkSave {
|
||||||
if($session->form->process("returnUrl")) {
|
if($session->form->process("returnUrl")) {
|
||||||
$session->http->setRedirect($session->form->process("returnUrl"));
|
$session->http->setRedirect($session->form->process("returnUrl"));
|
||||||
}
|
}
|
||||||
return www_listLDAPLinks();
|
return www_listLDAPLinks($session);
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 www_listLDAPLinks ( $session )
|
||||||
|
|
||||||
|
Create a paginated form that lists all LDAP links and allows the user to add, edit or copy LDAP
|
||||||
|
links. Each LDAP link is tested and the status of that test is returned.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub www_listLDAPLinks {
|
sub www_listLDAPLinks {
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
return $session->privilege->adminOnly() unless($session->user->isInGroup(3));
|
return $session->privilege->adminOnly() unless($session->user->isInGroup(3));
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ to be used as template variables in the WebGUI template system.
|
||||||
|
|
||||||
=head3 $session
|
=head3 $session
|
||||||
|
|
||||||
The current WebGUI session variable.
|
The current WebGUI session object.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|
@ -87,7 +87,7 @@ Saves profile data to a user's profile. Does not validate any of the data.
|
||||||
|
|
||||||
=head3 $session
|
=head3 $session
|
||||||
|
|
||||||
WebGUI session variable
|
WebGUI session object
|
||||||
|
|
||||||
=head3 $user
|
=head3 $user
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,11 +34,11 @@ Only users in group Admin (3) are allowed to call subroutines in this package.
|
||||||
|
|
||||||
=head2 _submenu ( $session, $workarea, $title, $help )
|
=head2 _submenu ( $session, $workarea, $title, $help )
|
||||||
|
|
||||||
Utility routine for creating the AdminConsole for DatabaseLink functions.
|
Utility routine for creating the AdminConsole for ProfileSetting functions.
|
||||||
|
|
||||||
=head3 $session
|
=head3 $session
|
||||||
|
|
||||||
The current WebGUI session variable.
|
The current WebGUI session object.
|
||||||
|
|
||||||
=head3 $workarea
|
=head3 $workarea
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,11 @@ a search and replace function in word processors.
|
||||||
|
|
||||||
=head2 _submenu ( $session, $workarea, $title, $help )
|
=head2 _submenu ( $session, $workarea, $title, $help )
|
||||||
|
|
||||||
Utility routine for creating the AdminConsole for DatabaseLink functions.
|
Utility routine for creating the AdminConsole for Replacement functions.
|
||||||
|
|
||||||
=head3 $session
|
=head3 $session
|
||||||
|
|
||||||
The current WebGUI session variable.
|
The current WebGUI session object.
|
||||||
|
|
||||||
=head3 $workarea
|
=head3 $workarea
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ Utility routine for creating the AdminConsole for Statistics functions.
|
||||||
|
|
||||||
=head3 $session
|
=head3 $session
|
||||||
|
|
||||||
The current WebGUI session variable.
|
The current WebGUI session object.
|
||||||
|
|
||||||
=head3 $workarea
|
=head3 $workarea
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue