Pangloss::Segment::Decline::CantAddCategories - decline unless there's a user


Pangloss documentation Contained in the Pangloss distribution.

Index


Code Index:

NAME

Top

Pangloss::Segment::Decline::CantAddCategories - decline unless there's a user that can add concpets in the session

SYNOPSIS

Top

  $pipe->add_segment( Pangloss::Segment::CantAddCategories->new )

DESCRIPTION

Top

This class inherits its interface from OpenFrame::WebApp::Segment::Decline and OpenFrame::WebApp::Segment::User::Session.

AUTHOR

Top

Steve Purkis <spurkis@quiup.com>

SEE ALSO

Top

Pangloss


Pangloss documentation Contained in the Pangloss distribution.
package Pangloss::Segment::Decline::CantAddCategories;

use base qw( OpenFrame::WebApp::Segment::Decline
	     OpenFrame::WebApp::Segment::User::Session );

our $VERSION  = ((require Pangloss::Version), $Pangloss::VERSION)[1];
our $REVISION = (split(/ /, ' $Revision: 1.3 $ '))[2];

sub should_decline {
    my $self = shift;
    my $user = $self->get_user_from_session || return 1;
    return $user->cant_add_categories;
}

1;

__END__

#------------------------------------------------------------------------------