From f491cc2d328791ca9b1b5812a35959e7cfead77e Mon Sep 17 00:00:00 2001 From: einhverfr Date: Sun, 18 Nov 2007 00:36:36 +0000 Subject: Payments changes committed, through QA git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1873 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB.pm | 2 +- LedgerSMB/Auth/DB.pm | 1 + UI/login.js | 3 +- UI/payment1.html | 124 +++++++++++++++++++++++++++++++++++ UI/payment2.html | 161 ++++++++++++++++++++++++++++++++++++++++++++++ UI/payments/payment1.html | 2 +- UI/payments/payment2.html | 4 +- scripts/payment.pl | 4 +- sql/modules/Roles.sql | 10 +++ 9 files changed, 304 insertions(+), 7 deletions(-) create mode 100644 UI/payment1.html create mode 100644 UI/payment2.html diff --git a/LedgerSMB.pm b/LedgerSMB.pm index 7b555e10..b4d6c360 100755 --- a/LedgerSMB.pm +++ b/LedgerSMB.pm @@ -196,6 +196,7 @@ sub new { #check for valid session unless this is an inital authentication #request -- CT if (!LedgerSMB::Auth::session_check( $cookie{"LedgerSMB"}, $self) ) { + print STDERR "Session did not check"; $self->_get_password("Session Expired"); exit; } @@ -633,7 +634,6 @@ sub error { sub _db_init { my $self = shift @_; my %args = @_; - my $creds = LedgerSMB::Auth::get_credentials(); $self->{login} = $creds->{login}; diff --git a/LedgerSMB/Auth/DB.pm b/LedgerSMB/Auth/DB.pm index da89711f..ca5f01fa 100755 --- a/LedgerSMB/Auth/DB.pm +++ b/LedgerSMB/Auth/DB.pm @@ -132,6 +132,7 @@ sub session_check { sub session_create { my ($lsmb) = @_; + print STDERR "Creating Session\n"; my $path = ($ENV{SCRIPT_NAME}); $path =~ s|[^/]*$||; use Time::HiRes qw(gettimeofday); diff --git a/UI/login.js b/UI/login.js index aa2af97c..5f5eed63 100644 --- a/UI/login.js +++ b/UI/login.js @@ -17,7 +17,6 @@ function submit_form() { + document.login.company.value, false, username, password); http.send(""); - alert(http.status); if (http.status != 200){ alert("Access Denied: Bad username/Password"); return false; @@ -36,4 +35,4 @@ function check_auth() { + document.login.company.value, false, username, password ); -} \ No newline at end of file +} diff --git a/UI/payment1.html b/UI/payment1.html new file mode 100644 index 00000000..d064ad0e --- /dev/null +++ b/UI/payment1.html @@ -0,0 +1,124 @@ + + + + <?lsmb titlebar ?> + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + + + + + + + + +
+ + + + +
>= + + <= + +
+ +
+ + + +
+ + diff --git a/UI/payment2.html b/UI/payment2.html new file mode 100644 index 00000000..1b53d6da --- /dev/null +++ b/UI/payment2.html @@ -0,0 +1,161 @@ + + + + <?lsmb titlebar ?> + + + + + + + + + +
+ + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
: + + +
: + + +
:
: + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+
">
"> +
+ + "> + + + + + "> + + + + + + +
">">
">">" type="checkbox" class="checkbox">
+
+ +
+
+ + + + +
+ + diff --git a/UI/payments/payment1.html b/UI/payments/payment1.html index d064ad0e..50fa1ca9 100644 --- a/UI/payments/payment1.html +++ b/UI/payments/payment1.html @@ -17,7 +17,7 @@
- + diff --git a/UI/payments/payment2.html b/UI/payments/payment2.html index 502cb859..d395b170 100644 --- a/UI/payments/payment2.html +++ b/UI/payments/payment2.html @@ -14,7 +14,7 @@ - + @@ -158,4 +158,4 @@ - \ No newline at end of file + diff --git a/scripts/payment.pl b/scripts/payment.pl index ae476a9b..01e32fc7 100644 --- a/scripts/payment.pl +++ b/scripts/payment.pl @@ -157,6 +157,7 @@ my $template; $template = LedgerSMB::Template->new( user => $request->{_user}, locale => $request->{_locale}, +# path => 'UI/payments', path => 'UI', template => 'payment1', format => 'HTML', ); @@ -362,7 +363,8 @@ my $select = { my $template = LedgerSMB::Template->new( user => $request->{_user}, locale => $request->{_locale}, - path => 'UI', +# path => 'UI/payments', + path => 'UI', template => 'payment2', format => 'HTML' ); eval {$template->render($select) }; diff --git a/sql/modules/Roles.sql b/sql/modules/Roles.sql index 126f4d2f..a44ebcf4 100644 --- a/sql/modules/Roles.sql +++ b/sql/modules/Roles.sql @@ -1366,3 +1366,13 @@ lsmb___create_project_translation; GRANT SELECT ON custom_field_catalog TO public; GRANT SELECT ON custom_table_catalog TO public; + +-- Grants to all users; +GRANT ALL ON defaults TO public; +GRANT ALL ON "session" TO public; +GRANT ALL ON session_session_id_seq TO PUBLIC; +GRANT SELECT ON users TO public; +GRANT SELECT ON user_preference TO public; +GRANT SELECT ON custom_table_catalog TO PUBLIC; +GRANT SELECT ON custom_field_catalog TO PUBLIC; +grant select on menu_node, menu_attribute, menu_acl to public; -- cgit v1.2.3