X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fam.pl;h=ee2b0e6486526a2d9ae137b180d8af58c573fc6c;hb=755822a826214b0981138e155c2c33f46ee21dec;hp=fbb5cfd3e46ebeb67d6cde08a0b1347dc754825a;hpb=e549422fb649ca2299e684dc10ffe4a0f8c7efb1;p=kivitendo-erp.git
diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl
index fbb5cfd3e..ee2b0e648 100644
--- a/bin/mozilla/am.pl
+++ b/bin/mozilla/am.pl
@@ -31,12 +31,14 @@
#
#======================================================================
+use SL::Auth;
use SL::AM;
use SL::CA;
use SL::Form;
use SL::User;
use SL::USTVA;
use SL::Iconv;
+use SL::TODO;
use CGI::Ajax;
use CGI;
@@ -57,13 +59,13 @@ sub continue { call_sub($form->{"nextsub"}); }
sub add_account {
$lxdebug->enter_sub();
+ $auth->assert('config');
+
$form->{title} = "Add";
$form->{charttype} = "A";
AM->get_account(\%myconfig, \%$form);
- $form->{callback} =
- "$form->{script}?action=list_account&login=$form->{login}&password=$form->{password}"
- unless $form->{callback};
+ $form->{callback} = "am.pl?action=list_account" unless $form->{callback};
&account_header;
&form_footer;
@@ -74,6 +76,8 @@ sub add_account {
sub edit_account {
$lxdebug->enter_sub();
+ $auth->assert('config');
+
$form->{title} = "Edit";
AM->get_account(\%myconfig, \%$form);
@@ -90,6 +94,8 @@ sub edit_account {
sub account_header {
$lxdebug->enter_sub();
+ $auth->assert('config');
+
if ( $form->{action} eq 'edit_account') {
$form->{account_exists} = '1';
}
@@ -348,12 +354,11 @@ sub account_header {
sub form_footer {
$lxdebug->enter_sub();
- print qq|
+ $auth->assert('config');
-
+ print qq|
-{login}>
-{password}>
+
|;
if ((!$form->{id}) || ($form->{id} && $form->{orphaned}) || (($form->{type} eq "account") && (!$form->{new_chart_valid}))) {
@@ -381,6 +386,8 @@ sub form_footer {
sub save_account {
$lxdebug->enter_sub();
+ $auth->assert('config');
+
$form->isblank("accno", $locale->text('Account Number missing!'));
$form->isblank("description", $locale->text('Account Description missing!'));
@@ -398,6 +405,8 @@ sub save_account {
sub list_account {
$lxdebug->enter_sub();
+ $auth->assert('config');
+
$form->{callback} = build_std_url('action=list_account');
my $link_edit_account = build_std_url('action=edit_account', 'callback');
@@ -449,6 +458,8 @@ sub list_account_details {
# Ajax Funktion aus list_account_details
$lxdebug->enter_sub();
+ $auth->assert('config');
+
my $chart_id = $form->{args};
CA->all_accounts(\%myconfig, \%$form, $chart_id);
@@ -514,6 +525,8 @@ sub list_account_details {
sub delete_account {
$lxdebug->enter_sub();
+ $auth->assert('config');
+
$form->{title} = $locale->text('Delete Account');
foreach $id (
@@ -534,12 +547,12 @@ sub delete_account {
sub add_department {
$lxdebug->enter_sub();
+ $auth->assert('config');
+
$form->{title} = "Add";
$form->{role} = "P";
- $form->{callback} =
- "$form->{script}?action=add_department&login=$form->{login}&password=$form->{password}"
- unless $form->{callback};
+ $form->{callback} = "am.pl?action=add_department" unless $form->{callback};
&department_header;
&form_footer;
@@ -550,6 +563,8 @@ sub add_department {
sub edit_department {
$lxdebug->enter_sub();
+ $auth->assert('config');
+
$form->{title} = "Edit";
AM->get_department(\%myconfig, \%$form);
@@ -563,10 +578,11 @@ sub edit_department {
sub list_department {
$lxdebug->enter_sub();
+ $auth->assert('config');
+
AM->departments(\%myconfig, \%$form);
- $form->{callback} =
- "$form->{script}?action=list_department&login=$form->{login}&password=$form->{password}";
+ $form->{callback} = "am.pl?action=list_department";
$callback = $form->escape($form->{callback});
@@ -622,7 +638,7 @@ sub list_department {
$profitcenter = ($ref->{role} eq "P") ? "X" : "";
$column_data{description} =
- qq|