Permalink
Browse files

Merge branch 'master' of github.com:sequelpro/sequelpro

  • Loading branch information...
stuconnolly committed Oct 3, 2018
2 parents 562eb1d + 7dbd044 commit 3f24d5d76ccb26c480ec778b5cd26d95f8c63444
Showing with 12 additions and 5 deletions.
  1. +2 −0 Models/SPUserManager.xcdatamodel/contents
  2. +10 −5 Source/SPUserManager.m
@@ -9,6 +9,7 @@
<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="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="event_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
<attribute name="execute_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
@@ -35,6 +36,7 @@
<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="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="event_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
<attribute name="execute_priv" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
View
@@ -101,12 +101,17 @@ - (id)init
// is derived automatically. While most keys can be automatically converted without
// any difficulty, some keys differ slightly in mysql column storage to GRANT syntax;
// 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 = [@{
@"Grant_priv": @"Grant_option_priv",
@"Show_db_priv": @"Show_databases_priv",
@"Create_tmp_table_priv": @"Create_temporary_tables_priv",
@"Repl_slave_priv": @"Replication_slave_priv",
@"Repl_client_priv": @"Replication_client_priv",
@"Grant_priv": @"Grant_option_priv",
@"Show_db_priv": @"Show_databases_priv",
@"Create_tmp_table_priv": @"Create_temporary_tables_priv",
@"Repl_slave_priv": @"Replication_slave_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];
schemas = [[NSMutableArray alloc] init];

0 comments on commit 3f24d5d

Please sign in to comment.