~ubuntu-branches/ubuntu/natty/otrs2/natty-updates

« back to all changes in this revision

Viewing changes to Kernel/Modules/AdminRole.pm

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2007-04-14 17:58:55 UTC
  • mto: (20.1.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: package-import@ubuntu.com-20070414175855-9ne0w01yu1q44ch0
Tags: upstream-2.1.7
ImportĀ upstreamĀ versionĀ 2.1.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# --
2
2
# Kernel/Modules/AdminRole.pm - to add/update/delete roles
3
 
# Copyright (C) 2001-2005 Martin Edenhofer <martin+code@otrs.org>
 
3
# Copyright (C) 2001-2006 OTRS GmbH, http://otrs.org/
4
4
# --
5
 
# $Id: AdminRole.pm,v 1.6 2005/11/11 16:00:07 martin Exp $
 
5
# $Id: AdminRole.pm,v 1.8 2006/10/09 17:38:03 mh Exp $
6
6
# --
7
7
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
8
8
# the enclosed file COPYING for license information (GPL). If you
14
14
use strict;
15
15
 
16
16
use vars qw($VERSION);
17
 
$VERSION = '$Revision: 1.6 $';
 
17
$VERSION = '$Revision: 1.8 $';
18
18
$VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/;
19
19
 
20
 
# --
21
20
sub new {
22
21
    my $Type = shift;
23
22
    my %Param = @_;
40
39
 
41
40
    return $Self;
42
41
}
43
 
# --
 
42
 
44
43
sub Run {
45
44
    my $Self = shift;
46
45
    my %Param = @_;
80
79
            $GetParam{$_} = $Self->{ParamObject}->GetParam(Param => $_) || '';
81
80
        }
82
81
        if(my $Id = $Self->{GroupObject}->RoleAdd(%GetParam, UserID => $Self->{UserID})) {
83
 
             return $Self->{LayoutObject}->Redirect(
84
 
                 OP => "Action=AdminRole",
85
 
             );
 
82
            return $Self->{LayoutObject}->Redirect(
 
83
                OP => "Action=AdminRole",
 
84
            );
86
85
        }
87
86
        else {
88
87
            return $Self->{LayoutObject}->ErrorScreen();
97
96
        return $Output;
98
97
    }
99
98
}
100
 
# --
 
99
 
101
100
sub _Mask {
102
101
    my $Self = shift;
103
102
    my %Param = @_;
105
104
    # build ValidID string
106
105
    $Param{'ValidOption'} = $Self->{LayoutObject}->OptionStrgHashRef(
107
106
        Data => {
108
 
          $Self->{DBObject}->GetTableData(
109
 
            What => 'id, name',
110
 
            Table => 'valid',
111
 
            Valid => 0,
112
 
          )
 
107
            $Self->{DBObject}->GetTableData(
 
108
                What => 'id, name',
 
109
                Table => 'valid',
 
110
                Valid => 0,
 
111
            )
113
112
        },
114
113
        Name => 'ValidID',
115
114
        SelectedID => $Param{ValidID},
125
124
 
126
125
    return $Self->{LayoutObject}->Output(TemplateFile => 'AdminRoleForm', Data => \%Param);
127
126
}
128
 
# --
 
127
 
129
128
1;