Skip to content

Commit

Permalink
Merge branch 'master' of github.com:sequelpro/sequelpro
Browse files Browse the repository at this point in the history
  • Loading branch information
stuconnolly committed Oct 3, 2018
2 parents 562eb1d + 7dbd044 commit 3f24d5d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Models/SPUserManager.xcdatamodel/contents
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<attribute name="create_view_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/> <attribute name="create_view_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
<attribute name="db" attributeType="String" maxValueString="64" indexed="YES" syncable="YES"/> <attribute name="db" attributeType="String" maxValueString="64" indexed="YES" syncable="YES"/>
<attribute name="delete_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/> <attribute name="delete_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
<attribute name="delete_versioning_rows_priv" optional="YES" attributeType="Boolean" syncable="YES"/>
<attribute name="drop_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/> <attribute name="drop_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
<attribute name="event_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/> <attribute name="event_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
<attribute name="execute_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/> <attribute name="execute_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
Expand All @@ -35,6 +36,7 @@
<attribute name="create_user_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/> <attribute name="create_user_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
<attribute name="create_view_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/> <attribute name="create_view_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
<attribute name="delete_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/> <attribute name="delete_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
<attribute name="delete_versioning_rows_priv" optional="YES" attributeType="Boolean" syncable="YES"/>
<attribute name="drop_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/> <attribute name="drop_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
<attribute name="event_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/> <attribute name="event_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
<attribute name="execute_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/> <attribute name="execute_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
Expand Down
15 changes: 10 additions & 5 deletions Source/SPUserManager.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -101,12 +101,17 @@ - (id)init
// is derived automatically. While most keys can be automatically converted without // is derived automatically. While most keys can be automatically converted without
// any difficulty, some keys differ slightly in mysql column storage to GRANT syntax; // any difficulty, some keys differ slightly in mysql column storage to GRANT syntax;
// this dictionary provides mappings for those values to ensure consistency. // this dictionary provides mappings for those values to ensure consistency.

// key is: The name of the actual column in the mysql.users / mysql.db table
// value is: The "Privilege" value from "SHOW PRIVILEGES" with " " replaced by "_" and "_priv" appended
privColumnToGrantMap = [@{ privColumnToGrantMap = [@{
@"Grant_priv": @"Grant_option_priv", @"Grant_priv": @"Grant_option_priv",
@"Show_db_priv": @"Show_databases_priv", @"Show_db_priv": @"Show_databases_priv",
@"Create_tmp_table_priv": @"Create_temporary_tables_priv", @"Create_tmp_table_priv": @"Create_temporary_tables_priv",
@"Repl_slave_priv": @"Replication_slave_priv", @"Repl_slave_priv": @"Replication_slave_priv",
@"Repl_client_priv": @"Replication_client_priv", @"Repl_client_priv": @"Replication_client_priv",
@"Truncate_versioning_priv": @"Delete_versioning_rows_priv", // MariaDB only, 10.3.4 only
@"Delete_history_priv": @"Delete_versioning_rows_priv", // MariaDB only, since 10.3.5
} retain]; } retain];


schemas = [[NSMutableArray alloc] init]; schemas = [[NSMutableArray alloc] init];
Expand Down

0 comments on commit 3f24d5d

Please sign in to comment.