1 |
snetram |
1.1 |
--- smeserver-subversion-1.4/root/etc/e-smith/db/accounts/migrate/80subversionGroups.RewriteMigrateScript 2008-03-01 22:51:09.000000000 +0100 |
2 |
|
|
+++ smeserver-subversion-1.4/root/etc/e-smith/db/accounts/migrate/80subversionGroups 2008-03-01 22:54:53.000000000 +0100 |
3 |
|
|
@@ -0,0 +1,25 @@ |
4 |
|
|
+{ |
5 |
|
|
+ use define PROPERTY => 'Groups'; |
6 |
|
|
+ use define PROPERTY_WRITE => 'GroupsWrite'; |
7 |
|
|
+ use define PROPERTY_READ => 'GroupsRead'; |
8 |
|
|
+ |
9 |
|
|
+ my @repositories = $DB->get_all_by_prop('type' => 'repository'); |
10 |
|
|
+ |
11 |
|
|
+ REPOSITORY: foreach my $repository ( |
12 |
|
|
+ (@repositories), |
13 |
|
|
+ ) |
14 |
|
|
+ { |
15 |
|
|
+ |
16 |
|
|
+ my $key = $repository->key; |
17 |
|
|
+ |
18 |
|
|
+ my $rec = $DB->get($key) or next REPOSITORY; |
19 |
|
|
+ |
20 |
|
|
+ my $property = $DBB->get_prop_and_delete($key, PROPERTY) or next REPOSITORY; |
21 |
|
|
+ |
22 |
|
|
+ # Migrating existing properties to new ones to keep functionality |
23 |
|
|
+ $rec->merge_prop(PROPERTY_WRITE, $property); |
24 |
|
|
+ $rec->merge_prop(PROPERTY_READ, $property); |
25 |
|
|
+ |
26 |
|
|
+ } |
27 |
|
|
+ |
28 |
|
|
+} |
29 |
|
|
--- smeserver-subversion-1.4/root/etc/e-smith/db/accounts/migrate/80subversionUsers.RewriteMigrateScript 2008-03-01 22:49:28.000000000 +0100 |
30 |
|
|
+++ smeserver-subversion-1.4/root/etc/e-smith/db/accounts/migrate/80subversionUsers 2008-03-01 22:54:02.000000000 +0100 |
31 |
|
|
@@ -0,0 +1,25 @@ |
32 |
|
|
+{ |
33 |
|
|
+ use define PROPERTY => 'Users'; |
34 |
|
|
+ use define PROPERTY_WRITE => 'UsersWrite'; |
35 |
|
|
+ use define PROPERTY_READ => 'UsersRead'; |
36 |
|
|
+ |
37 |
|
|
+ my @repositories = $DB->get_all_by_prop('type' => 'repository'); |
38 |
|
|
+ |
39 |
|
|
+ REPOSITORY: foreach my $repository ( |
40 |
|
|
+ (@repositories), |
41 |
|
|
+ ) |
42 |
|
|
+ { |
43 |
|
|
+ |
44 |
|
|
+ my $key = $repository->key; |
45 |
|
|
+ |
46 |
|
|
+ my $rec = $DB->get($key) or next REPOSITORY; |
47 |
|
|
+ |
48 |
|
|
+ my $property = $DBB->get_prop_and_delete($key, PROPERTY) or next REPOSITORY; |
49 |
|
|
+ |
50 |
|
|
+ # Migrating existing properties to new ones to keep functionality |
51 |
|
|
+ $rec->merge_prop(PROPERTY_WRITE, $property); |
52 |
|
|
+ $rec->merge_prop(PROPERTY_READ, $property); |
53 |
|
|
+ |
54 |
|
|
+ } |
55 |
|
|
+ |
56 |
|
|
+} |
57 |
|
|
--- smeserver-subversion-1.4/root/etc/e-smith/db/accounts/migrate/80subversion.RewriteMigrateScript 2008-03-01 22:59:05.000000000 +0100 |
58 |
|
|
+++ smeserver-subversion-1.4/root/etc/e-smith/db/accounts/migrate/80subversion 2008-03-01 23:00:44.000000000 +0100 |
59 |
|
|
@@ -1,25 +0,0 @@ |
60 |
|
|
-{ |
61 |
|
|
- my @repositories = $DB->get_all_by_prop('type' => 'repository'); |
62 |
|
|
- |
63 |
|
|
- foreach my $repository ( |
64 |
|
|
- (@repositories), |
65 |
|
|
- ) |
66 |
|
|
- { |
67 |
|
|
- |
68 |
|
|
- my $key = $repository->key; |
69 |
|
|
- |
70 |
|
|
- my $rec = $DB->get($key); |
71 |
|
|
- |
72 |
|
|
- my %properties = $repository->props; |
73 |
|
|
- |
74 |
|
|
- # Creating new blank entries |
75 |
|
|
- $rec->set_prop('UsersRead', ""); |
76 |
|
|
- $rec->set_prop('GroupsRead', ""); |
77 |
|
|
- |
78 |
|
|
- # Migrating existing properties to new ones to keep functionality |
79 |
|
|
- $rec->set_prop('UsersWrite', $DB->get_prop_and_delete($key, 'Users') || ""); |
80 |
|
|
- $rec->set_prop('GroupsWrite', $DB->get_prop_and_delete($key, 'Groups') || ""); |
81 |
|
|
- |
82 |
|
|
- } |
83 |
|
|
- |
84 |
|
|
-} |
85 |
|
|
|