1 |
snetram |
1.1 |
--- smeserver-subversion-1.4/root/etc/e-smith/db/accounts/migrate/80subversion.MigrateOnUpdatesAsWell 2008-02-27 20:36:31.000000000 +0100 |
2 |
|
|
+++ smeserver-subversion-1.4/root/etc/e-smith/db/accounts/migrate/80subversion 2008-03-01 19:09:31.000000000 +0100 |
3 |
|
|
@@ -12,13 +12,54 @@ |
4 |
|
|
|
5 |
|
|
my %properties = $repository->props; |
6 |
|
|
|
7 |
|
|
- # Creating new blank entries |
8 |
|
|
- $rec->set_prop('UsersRead', ""); |
9 |
|
|
- $rec->set_prop('GroupsRead', ""); |
10 |
|
|
- |
11 |
|
|
- # Migrating existing properties to new ones to keep functionality |
12 |
|
|
- $rec->set_prop('UsersWrite', $DB->get_prop_and_delete($key, 'Users') || ""); |
13 |
|
|
- $rec->set_prop('GroupsWrite', $DB->get_prop_and_delete($key, 'Groups') || ""); |
14 |
|
|
+ my $GroupsWrite = $properties{'GroupsWrite'} || ''; |
15 |
|
|
+ my $GroupsRead = $properties{'GroupsRead'} || ''; |
16 |
|
|
+ my $UsersWrite = $properties{'UsersWrite'} || ''; |
17 |
|
|
+ my $UsersRead = $properties{'UsersRead'} || ''; |
18 |
|
|
+ |
19 |
|
|
+ my $Groups = $DB->get_prop_and_delete($key, 'Groups') || ''; |
20 |
|
|
+ my $Users = $DB->get_prop_and_delete($key, 'Users') || ''; |
21 |
|
|
+ |
22 |
|
|
+ # Populate properties |
23 |
|
|
+ if ($GroupsWrite eq '') { |
24 |
|
|
+ |
25 |
|
|
+ $rec->set_prop('GroupsWrite', $Groups); |
26 |
|
|
+ |
27 |
|
|
+ } else { |
28 |
|
|
+ |
29 |
|
|
+ $rec->set_prop('GroupsWrite', $GroupsWrite); |
30 |
|
|
+ |
31 |
|
|
+ } |
32 |
|
|
+ |
33 |
|
|
+ if ($GroupsRead eq '') { |
34 |
|
|
+ |
35 |
|
|
+ $rec->set_prop('GroupsRead', $Groups); |
36 |
|
|
+ |
37 |
|
|
+ } else { |
38 |
|
|
+ |
39 |
|
|
+ $rec->set_prop('GroupsRead', $GroupsRead); |
40 |
|
|
+ |
41 |
|
|
+ } |
42 |
|
|
+ |
43 |
|
|
+ if ($UsersWrite eq '') { |
44 |
|
|
+ |
45 |
|
|
+ $rec->set_prop('UsersWrite', $Users); |
46 |
|
|
+ |
47 |
|
|
+ } else { |
48 |
|
|
+ |
49 |
|
|
+ $rec->set_prop('UsersWrite', $UsersWrite); |
50 |
|
|
+ |
51 |
|
|
+ } |
52 |
|
|
+ |
53 |
|
|
+ if ($UsersRead eq '') { |
54 |
|
|
+ |
55 |
|
|
+ $rec->set_prop('UsersRead', $Users); |
56 |
|
|
+ |
57 |
|
|
+ } else { |
58 |
|
|
+ |
59 |
|
|
+ $rec->set_prop('UserRead', $UsersRead); |
60 |
|
|
+ |
61 |
|
|
+ } |
62 |
|
|
|
63 |
|
|
} |
64 |
|
|
|