[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5818] trunk
- Subject: SF.net SVN: ledger-smb:[5818] trunk
- From: ..hidden..
- Date: Sat, 18 May 2013 04:36:05 +0000
Revision: 5818
http://sourceforge.net/p/ledger-smb/code/5818
Author: einhverfr
Date: 2013-05-18 04:36:04 +0000 (Sat, 18 May 2013)
Log Message:
-----------
Fixed user creation on db wizard
Modified Paths:
--------------
trunk/UI/Contact/divs/user.html
trunk/UI/setup/new_user.html
trunk/sql/modules/admin.sql
Modified: trunk/UI/Contact/divs/user.html
===================================================================
--- trunk/UI/Contact/divs/user.html 2013-05-17 19:24:16 UTC (rev 5817)
+++ trunk/UI/Contact/divs/user.html 2013-05-18 04:36:04 UTC (rev 5818)
@@ -2,7 +2,7 @@
<div id="user_div" class="container">
<div class="listtop">
<?lsmb
- IF request.import;
+ IF request.pls_import;
text('Importing User');
action = 'save_user';
ELSIF user.username;
@@ -50,7 +50,7 @@
<tr>
<td><?lsmb text('Import') ?></td>
<?lsmb
- IF request.import;
+ IF request.pls_import;
importc1 = 'CHECKED';
importc0 = '';
ELSE;
@@ -99,13 +99,13 @@
};
?>
</form>
- <?lsmb IF user.username AND request.import != 1 ?>
+ <?lsmb IF user.entity_id ?>
<hr />
<form name="groups" method="POST" action="employee.pl">
<?lsmb PROCESS input element_data = {
type="hidden"
name="user_id"
- value= user.user.id
+ value= user.id
} ?>
<table>
<!-- Groups section -->
Modified: trunk/UI/setup/new_user.html
===================================================================
--- trunk/UI/setup/new_user.html 2013-05-17 19:24:16 UTC (rev 5817)
+++ trunk/UI/setup/new_user.html 2013-05-18 04:36:04 UTC (rev 5818)
@@ -35,14 +35,14 @@
label = 'Yes'
value = '1'
checked = ''
- name = 'import'
+ name = 'pls_import'
type = 'radio'
};
INCLUDE input element_data = {
label = 'No'
value = '0'
checked = 'CHECKED'
- name = 'import'
+ name = 'pls_import'
type = 'radio'
} ?>
</div>
Modified: trunk/sql/modules/admin.sql
===================================================================
--- trunk/sql/modules/admin.sql 2013-05-17 19:24:16 UTC (rev 5817)
+++ trunk/sql/modules/admin.sql 2013-05-18 04:36:04 UTC (rev 5818)
@@ -331,12 +331,14 @@
$$ Alloes a user to change his or her own password. The password is set to
expire setting_get('password_duration') days after the password change.$$;
+DROP FUNCTION IF EXISTS admin__save_user(int, int, text, text, bool);
+
CREATE OR REPLACE FUNCTION admin__save_user(
in_id int,
in_entity_id INT,
in_username text,
in_password TEXT,
- in_import BOOL
+ in_pls_import BOOL
) returns int AS $$
DECLARE
@@ -356,7 +358,7 @@
t_is_role := found;
t_is_user := admin__is_user(in_username);
- IF t_is_role is true and t_is_user is false and in_import is false THEN
+ IF t_is_role is true and t_is_user is false and in_pls_import is false THEN
RAISE EXCEPTION 'Duplicate user';
END IF;
@@ -365,10 +367,10 @@
' WITH ENCRYPTED PASSWORD ' || quote_literal (in_password)
|| $e$ valid until $e$ ||
quote_literal(now() + '1 day'::interval);
- elsif in_import is false AND t_is_user is false
+ elsif in_pls_import is false AND t_is_user is false
AND in_password IS NULL THEN
RAISE EXCEPTION 'No password';
- elsif t_is_role is false and in_import IS FALSE THEN
+ elsif t_is_role is false and in_pls_import IS FALSE THEN
-- create an actual user
execute 'CREATE USER ' || quote_ident( in_username ) ||
' WITH ENCRYPTED PASSWORD ' || quote_literal (in_password)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.