Browse code

flag of admin permissions moved from table subscriber to table admin privileges column perms in table subscriber is not further needed

Karel Kozlik authored on 13/04/2004 19:11:08
Showing 1 changed files
... ...
@@ -179,12 +179,18 @@ if [ $# -eq 1 ] ; then
179 179
 	INITIAL_USER="INSERT INTO subscriber
180 180
 		($USERCOL, password, first_name, last_name, phone,
181 181
 		email_address, datetime_created, datetime_modified, confirmation,
182
-		flag, sendnotification, greeting, ha1, domain, ha1b, phplib_id, perms )
182
+    flag, sendnotification, greeting, ha1, domain, ha1b, phplib_id )
183 183
 		VALUES ( 'admin', 'heslo', 'Initial', 'Admin', '123',
184 184
 		'root@localhost', '2002-09-04 19:37:45', '0000-00-00 00:00:00',
185 185
 		'57DaSIPuCm52UNe54LF545750cfdL48OMZfroM53', 'o', '', '',
186 186
 		'$HA1', '$SIP_DOMAIN', '$HA1B',
187
-		'65e397cda0aa8e3202ea22cbd350e4e9', 'admin' );"
187
+    '65e397cda0aa8e3202ea22cbd350e4e9' );
188
+
189
+    INSERT INTO admin_privileges ($USERCOL, domain, priv_name, priv_value)
190
+    VALUES ('admin', '$SIP_DOMAIN', 'is_admin', '1');
191
+
192
+    INSERT INTO admin_privileges ($USERCOL, domain, priv_name, priv_value)
193
+    VALUES ('admin', '$SIP_DOMAIN', 'change_privileges', '1');"
188 194
 elif [ $# -eq 2 ] ; then
189 195
 	# if 3rd param set, don't create any initial user
190 196
 	INITIAL_USER=""
... ...
@@ -219,10 +225,10 @@ CREATE TABLE version (
219 225
 # Dumping data for table 'version'
220 226
 #
221 227
 
222
-INSERT INTO version VALUES ( 'subscriber', '3');
228
+INSERT INTO version VALUES ( 'subscriber', '4');
223 229
 INSERT INTO version VALUES ( 'reserved', '1');
224 230
 INSERT INTO version VALUES ( 'phonebook', '1');
225
-INSERT INTO version VALUES ( 'pending', '3');
231
+INSERT INTO version VALUES ( 'pending', '4');
226 232
 INSERT INTO version VALUES ( 'missed_calls', '2');
227 233
 INSERT INTO version VALUES ( 'location', '4');
228 234
 INSERT INTO version VALUES ( 'grp', '2');
... ...
@@ -417,7 +423,6 @@ CREATE TABLE pending (
417 423
   greeting varchar(50) NOT NULL default '',
418 424
   ha1 varchar(128) NOT NULL default '',
419 425
   ha1b varchar(128) NOT NULL default '',
420
-  perms varchar(32) default NULL,
421 426
   allow_find char(1) NOT NULL default '0',
422 427
   timezone varchar(128) default NULL,
423 428
   rpid varchar(128) default NULL,
... ...
@@ -483,7 +488,6 @@ CREATE TABLE subscriber (
483 488
   greeting varchar(50) NOT NULL default '',
484 489
   ha1 varchar(128) NOT NULL default '',
485 490
   ha1b varchar(128) NOT NULL default '',
486
-  perms varchar(32) default NULL,
487 491
   allow_find char(1) NOT NULL default '0',
488 492
   timezone varchar(128) default NULL,
489 493
   rpid varchar(128) default NULL,