67 Commits

Author SHA1 Message Date
0fa6c15c9d Implement multiple connections per window. DBtree and friends now have their nodes bound to TDBObject instances. Fixes issue #2144. 2010-10-05 23:06:29 +00:00
0889281c22 Let priv tree track the node's checkstate itself, and initialize all nodes in Tree.OnPaint, so there is no node left out when AutoOptions.toAutoTristateTracking is doing its job. Further, check/uncheck parent priv nodes manually in OnInitNode as this is not done by auto-tracking. Fixes issue #2163 again. 2010-09-17 05:24:44 +00:00
f69e8b31ce User manager: When checking a first level node, do not only auto-check initialized sub nodes, but also the non-initialized ones. Fixes issue #2163. 2010-09-11 11:46:17 +00:00
15d73678c6 Focus previous privilege tree node after deletion. Fixes issue #853. 2010-06-13 14:39:56 +00:00
f1ae13770d Bugfix: After click on password generator button, user was not marked as modified. 2010-05-14 22:37:53 +00:00
b3b1710c35 Introduce EDatabaseError exception class, so we're able to handle only those and let others raise the exception up to MadExcept. Helps finding non-database related AVs as users are able to get the callstack now. Similar to r3292 but more consistent all over the code now. 2010-04-24 13:56:57 +00:00
1ffea39756 Validate user + host name input in OnExit, not OnChange, which is too early when one of them gets reset. Fixes issue #1794. 2010-03-24 17:05:21 +00:00
860390e986 User manager: Add button to generate a random password. Fixes issue #1460. 2010-03-16 23:50:40 +00:00
962c0b3b44 Fix non working right anchors of aligned controls (mainly TEdit) on user manager dialog. 2010-02-21 10:59:19 +00:00
1376a4e5f0 Privilege tree doesn't repaint automatically when calling ReInitNode 2010-02-21 07:14:32 +00:00
812cbc82b6 Apply a new style to the user manager dialog:
* Use 2 VirtualTree's instead of broken TComboBoxEx pulldown's
* Enlarge the user list so all items are visible at once
* Privilege objects now use a tree style, 1st level is the objects name, 2nd level is the privilege name ("select", "update" ...)
Fixes issue #1707
2010-02-20 17:12:54 +00:00
29bd958a9f Work around too few items in TComboBoxEx in higher DPI modes. Fixes issue #1707. 2010-02-19 07:10:01 +00:00
c06dd0d8bf Fix mysterious endless loop in user manager, after having focused the password editor once. Make use of Delphi's new TextHint property to display the old hashed password, instead of assigning and removing OnChange handlers all the time. Fixes issue #1658. 2010-02-06 13:48:39 +00:00
9080ad7607 No need to use the Wide* version of string functions any longer. 2010-01-15 20:28:48 +00:00
52ea8f410a Use Unicode enabled TStringList instead of TWideStringList in all places. Should have no visible effect, apart from a very minor performance optimization, as String reference pointers are handled by Delphi, WideString by Windows. 2010-01-14 19:41:58 +00:00
a4652d39a4 * Fix compiler warnings due to implicit AnsiString to (Unicode)String or vice versa
* Remove workaround for Unicode text to and from clipboard
* Fix writing/reading wrong encoded text into/from registry - no need to use Utf8Encode() any longer
* Implement TMySQLQuery.ColAsAnsi() for cases in which we read binary data.
2010-01-07 00:00:56 +00:00
7d401ffde8 Upgrade to Delphi 2010:
* Removes TNT Unicode controls, which are no longer required. All VCL controls now have native Unicode support.
* Remove Delphi 11 packages, otherwise we would either need to keep TNT or break Unicode
* PngComponents update from Uwe Raabe on http://cc.embarcadero.com/Item/26127
* Adjust auto build process
* Since Delphi 2009, Strings are now UnicodeStrings, not AnsiStrings any longer. Fix a bunch of compiler errors which came along with this change.
TODO: Project should compile but give tons of compiler warnings.
2010-01-05 23:14:33 +00:00
f0f2036925 Avoid loading values from a privilege table with 0 rows. Fixes issue #1540. 2009-12-31 17:35:43 +00:00
e356cb7ed7 Sanitize all "uses" clauses from unneeded unit references. 2009-12-22 23:19:56 +00:00
8d32a1fd0c Raise with a more detailed exception message, to debug issue #1540. 2009-12-22 14:16:54 +00:00
115148fd23 Move a "continue" for deleted privs slightly lower, so these get deleted. Fixes issue #1454 2009-11-29 20:03:11 +00:00
6ebe40c929 Make INSERTs in user manager compatible with pre-4.1 servers by
* removing the ON DUPLICATE KEY clauses
* turning the INSERT into INSERT IGNORE
* and doing an UPDATE afterwards if RowsAffected is 0
Fixes issue #1229
2009-11-24 22:59:21 +00:00
45fa64fe81 Wrap most queries in a try..except block which may fail with a SQL privilege error. So these places do not raise an exception at user level. Exceptions should only raise in unpredictable error situations. Important for reactivating the MadExcept dialog. 2009-11-22 18:07:53 +00:00
12a8e2ebc5 Implement a more lightweight connection layer, consisting of 2 units in source directory. Breaks threading and window to window communication, which should be reimplemented later. 2009-10-28 00:08:49 +00:00
f01893d08a Experimental: Reintroduce table tab, this time by placing the existing editors for tables, views and routines as TFrames onto that tab. Unfortunately a whole bunch of GUI changes involved here which makes the diff unreadable. Should solve issue #1149 . 2009-06-04 12:56:55 +00:00
1d94ad0156 Bugfix: close user manager form when no access to privilege tables.
Forms are not closeable with Close() inside FormShow, you must either return -1 in response to a WM_CREATE message, post a WM_CLOSE (seen that fail too though), or just do the check before showing the form.
2009-03-04 14:43:35 +00:00
909d31fd64 Simplify writing settings to registry:
* Keep only one TRegistry object in memory instead of creating a new one in each routine.
* Move out relevant functions and TRegistry object from main to helpers to make them usable globally.
2009-01-03 17:16:11 +00:00
f1b3f5501f Remove last traces of MDI (issue #513). Merges code, controls and events from childwin into main. 2009-01-01 23:24:36 +00:00
a849c0cc9b Fix bug #852 : user manager delete/add object. The privilege enumeration relies on Combo.ItemIndex being the correct priv number which didn't work for privs which were marked as "deleted" and therefore hidden. Deleted access objects are now kept in the object pulldown and marked with a "deleted" icon plus a text postfix " (deleted)". 2008-11-03 23:44:42 +00:00
9a52593dc2 Use Vista's Segeo font for all forms by using the SetVistaFonts() in mainform plus the new routine InheritFont() which simply overtakes fontname and size from the mainform to all other forms. 2008-08-29 18:20:14 +00:00
6daf4b3f76 Fix most remaining Unicode unsafe GUI controls. 2008-08-25 20:24:00 +00:00
aabd4bbf57 Add some more support for databases and tables with unicode characters. 2008-08-08 19:32:24 +00:00
bfbf1ee2f1 Terminology update: a table consists of columns vs rows, and the intersection of a row and a column is called a field.
(Except for Delphi's TField and MySql's FIELD, obviously, which are harder to fix.)
2008-08-07 18:56:06 +00:00
2d59e35e38 Fix bug #584 "HeidiSQL GUI : Create New User Error(s)" 2008-06-23 19:16:45 +00:00
ea352df61d Bugfix: removing a privilege did not work for the special case where UPDATE ... ON DUPE KEY instead of INSERT has to be used (for the server-level privileges jumbled together with lots of irrelevant stuff we don't want to touch in mysql.user). 2008-06-23 17:06:06 +00:00
2ed4507666 Code cosmetic: Sanitize NODETYPE_BASETABLE constant from superflous "BASE" 2008-06-14 12:48:04 +00:00
7c876363ef Fix bug in TPrivilege.GetPrettyPrivNames: PrivNames with 4 chars or less (fx "File", "Drop") were converted to blank strings. Additionally stripping "_priv" was redundant here because it's already done before GetPrettyPrivNames is called. 2008-05-13 18:01:01 +00:00
3ce71e04fd Bugfix: some servers do not have all the max_xxx columns. 2008-05-13 12:37:34 +00:00
6225147165 * Bugfix: minor inconsistency when re-editing password.
* Color the password field light grey when it's showing a hash.
2008-05-13 12:32:00 +00:00
26c83c8274 Bugfix: selecting the limitations tab would cause the user to appear as modified. 2008-05-13 12:22:05 +00:00
6b1f0d1bfb Move some of the hints to a separate tab. Logically uglier but visually prettier. 2008-05-13 12:10:12 +00:00
8ab35a23a5 Fix firing queries in the wrong (= mysql) database after closing the user manager. ExecUseQuery also sets Connection.Database which is then compared with ActiveDatabase later in ExecXXQuery. 2008-05-12 22:28:59 +00:00
d0a0a22443 Display sizegrip in the lower right corners of all resizable forms which have no TStatusbar. (For copyright notices see code in helpers.pas) 2008-05-12 17:55:06 +00:00
e28e530488 The usermanager dialog is once created and then held in memory by main.pas, not by childwin.pas. Move preparing hints from FormCreate to FormShow to ensure the SHOW VARIABLES part is executed on the relevant server connection. 2008-05-12 08:18:46 +00:00
b095a2abb2 memoHints lacks a Transparent property and looks ugly in XP theming where the pages of a pagecontrol normally have a different color than clBtnFace. Convert the TMemo to a TLabel and set that to transparent. 2008-05-12 08:07:12 +00:00
5e0c5a235a Bugfix: consistency when editing the user name field. 2008-05-10 19:56:44 +00:00
4873f32e10 Bugfix: work around misplaced icons on Vista.
(I'm in 16-color mode right now, so if things look weird then that's why!)
2008-05-10 11:04:18 +00:00
dbe130ba74 Add a few more hints regarding the 'host' field. 2008-05-09 14:30:27 +00:00
e57857c975 * Bugfix: Allow editing the 'fallback' password and privileges.
Note on verbiage:  I chose "Everybody" rather than "Everyone" or "Fallback" as the pretty name for this account.

"Fallback" just seemed like it was misplaced in the user dropdown list.

"Everyone" seems to mean individuals in a group, while "everybody" seems to mean the group as a whole.  Thus "everyone" is a bit more personal.

This could convey the notion that you need to have a personal account before these privileges will apply to you, which is not the case.  Anyone that logs in with a non-existent user name will get these privileges.

Therefore, "Everybody".  It hopefully denotes that the privileges are given to everyone with a personal account, PLUS people authenticating with a rubbish user name (and the password, if any).

This last category of logins are commonly called "anonymous users" in the MySQL documentation.  "Anonymous" does not quite fit this account however, because the privileges given also apply to everyone else.

* Bugfix: Copy + paste same text in the username field caused a warning.
2008-05-09 13:35:26 +00:00
ec685f50b7 Bugfix: Host='' and Host='%' means the same. Canonicalization was in place here and there, but also missing in a couple of spots. 2008-05-09 12:38:56 +00:00