Index: branches/5.2.x/core/install/upgrades.sql
===================================================================
diff -u -r14652 -r14662
--- branches/5.2.x/core/install/upgrades.sql	(.../upgrades.sql)	(revision 14652)
+++ branches/5.2.x/core/install/upgrades.sql	(.../upgrades.sql)	(revision 14662)
@@ -2146,3 +2146,11 @@
 ALTER TABLE ItemReview
 	ADD HelpfulCount INT NOT NULL ,
 	ADD NotHelpfulCount INT NOT NULL;
+
+ALTER TABLE PermissionConfig ADD IsSystem TINYINT(1) NOT NULL DEFAULT '0';
+UPDATE PermissionConfig SET IsSystem = 1;
+
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.delete', 11, 1, 1, 0);
