WTF::Pages::Admin - Page generation and action methods for administrative pages and functions


VERSION

This document describes WTF::Pages::Admin version 1.02


SYNOPSIS

        use WTF::Pages::Admin;
        return WTF::Pages::Admin->screen_name($r);


DESCRIPTION

This module is a subclass of WTF::Page that houses page generation and action methods for administrative pages and functions.


METHODS

All methods are broken into two types: screen method and action methods. Both screen and action methods require one input, an Apache request (Apache2::RequestRec) object. Screen methods return XHTML, typically as a result of running the ``output()'' method of an HTML::Template object. Action methods set a new URL location and return an Apache redirect. Other input into either type of method is through an Apache2::Request object:

        my $req = WTF::Utils::get_req($r);

screen_authz()

This is a page generation method that generates the ``Administrate Authorizations'' page using the ``admin/authz.tmpl'' HTML::Template template. This page allows authorized users to alter or administrate authorization privileges to specific features.

action_save_new_authz()

This action method saves changes to the administrate authorization privileges made by authorized users under ``screen_admin_authz()''.

action_update()

This action method makes a system call to execute the database synchronization script to synchronize the local WTF database with the Bugzilla database.

screen_users()

This is a page generation method that generates the ``Administrate Users'' page using the ``admin/users.tmpl'' HTML::Template template. This page allows authorized users to alter or administrate employee user accounts regarding active states, functional areas, and team assignments.

action_save_users()

This action method saves changes to the employee user accounts made by authorized users under ``screen_admin_users()''.

screen_task_area()

This is a page generation method that generates the ``Alter Task/Area Display'' page using the ``admin/task_area.tmpl'' HTML::Template template. This page allows authorized users to select which project and non-project work tasks will be displayed for employees in each of the active company functional areas.

action_save_task_area()

This action method saves changes to the selection of project and non-project work tasks made by authorized users under ``screen_admin_task_area()''.

action_login_as()

This action method is called to set the ``login_as'' cookie when a manager (with the ``login_as'' authorization) makes a request to login as an employee in his or her team. After setting the cookie, the method redirects to the ``My Weekly Time'' page. If the manager tried to hack a user ID into the URL to login as someone who is not in the manager's team, the manager will get redirected to the ``Team View'' page and won't get a cookie set. Setting a cookie only tells WTF::Apache::Authen to start a ``login as'' authorization check. So in theory, a user shouldn't be able to hack into the ``login as'' functionality without really having access.

action_revert_to_self()

This action method simply deletes the ``login_as'' cookie, which removes the flag to WTF::Apache::Authen to run a ``login_as'' authorization check. The result is that the current user will revert to the default, which is to be logged in as him or herself.

screen_table_data()

This is a page generation method that generates the ``Administrate Table'' page using the ``admin/table_data.tmpl'' HTML::Template template. This page allows authorized users to view and edit the data in the application's various look-up tables. This method is somewhat generic, allowing for control of data across a small series of lookup tables with different designs.

action_save_table_data()

This action method is called from a form submitted from a page generated by the ``screen_table_data()'' method. It supports UPDATEs and INSERTs against look-up tables within the application's database.


DEPENDENCIES

WTF::Pages::Admin depends on the following modules:

WTF::Pages::Admin is a subclass of WTF::Pages.


COPYRIGHT, LICENSE, AND DISCLAIMER OF WARRANTY

Use of this module implies the reading and agreement with the license under which this software is release. That license can be found in the ``license.txt'' file included with this distribution.