1 |
slords |
1.1 |
--- smeserver-subversion-1.4/root/etc/e-smith/db/accounts/migrate/80subversionUsers.migratefix 2008-03-01 15:40:22.000000000 -0700 |
2 |
|
|
+++ smeserver-subversion-1.4/root/etc/e-smith/db/accounts/migrate/80subversionUsers 2008-03-01 15:40:02.000000000 -0700 |
3 |
|
|
@@ -1,25 +1,10 @@ |
4 |
|
|
{ |
5 |
|
|
- use define PROPERTY => 'Users'; |
6 |
|
|
- use define PROPERTY_WRITE => 'UsersWrite'; |
7 |
|
|
- use define PROPERTY_READ => 'UsersRead'; |
8 |
|
|
- |
9 |
|
|
- my @repositories = $DB->get_all_by_prop('type' => 'repository'); |
10 |
|
|
- |
11 |
|
|
- REPOSITORY: foreach my $repository ( |
12 |
|
|
- (@repositories), |
13 |
|
|
- ) |
14 |
|
|
+ foreach my $repository ($DB->get_all_by_prop('type' => 'repository')) |
15 |
|
|
{ |
16 |
|
|
+ my $property = $DB->get_prop_and_delete($repository->key, 'Users') or next; |
17 |
|
|
|
18 |
|
|
- my $key = $repository->key; |
19 |
|
|
- |
20 |
|
|
- my $rec = $DB->get($key) or next REPOSITORY; |
21 |
|
|
- |
22 |
|
|
- my $property = $DBB->get_prop_and_delete($key, PROPERTY) or next REPOSITORY; |
23 |
|
|
- |
24 |
|
|
- # Migrating existing properties to new ones to keep functionality |
25 |
|
|
- $rec->merge_prop(PROPERTY_WRITE, $property); |
26 |
|
|
- $rec->merge_prop(PROPERTY_READ, $property); |
27 |
|
|
+ $repository->merge_prop('UsersWrite', $property) unless $repository->prop('UsersWrite'); |
28 |
|
|
+ $repository->merge_prop('UsersRead', $property) unless $repository->prop('UsersRead'); |
29 |
|
|
|
30 |
|
|
} |
31 |
|
|
- |
32 |
|
|
} |
33 |
|
|
--- smeserver-subversion-1.4/root/etc/e-smith/db/accounts/migrate/80subversionGroups.migratefix 2008-03-01 15:40:22.000000000 -0700 |
34 |
|
|
+++ smeserver-subversion-1.4/root/etc/e-smith/db/accounts/migrate/80subversionGroups 2008-03-01 15:39:36.000000000 -0700 |
35 |
|
|
@@ -1,25 +1,10 @@ |
36 |
|
|
{ |
37 |
|
|
- use define PROPERTY => 'Groups'; |
38 |
|
|
- use define PROPERTY_WRITE => 'GroupsWrite'; |
39 |
|
|
- use define PROPERTY_READ => 'GroupsRead'; |
40 |
|
|
- |
41 |
|
|
- my @repositories = $DB->get_all_by_prop('type' => 'repository'); |
42 |
|
|
- |
43 |
|
|
- REPOSITORY: foreach my $repository ( |
44 |
|
|
- (@repositories), |
45 |
|
|
- ) |
46 |
|
|
+ foreach my $repository ($DB->get_all_by_prop('type' => 'repository')) |
47 |
|
|
{ |
48 |
|
|
+ my $property = $DB->get_prop_and_delete($repository->key, 'Groups') or next; |
49 |
|
|
|
50 |
|
|
- my $key = $repository->key; |
51 |
|
|
- |
52 |
|
|
- my $rec = $DB->get($key) or next REPOSITORY; |
53 |
|
|
- |
54 |
|
|
- my $property = $DBB->get_prop_and_delete($key, PROPERTY) or next REPOSITORY; |
55 |
|
|
- |
56 |
|
|
- # Migrating existing properties to new ones to keep functionality |
57 |
|
|
- $rec->merge_prop(PROPERTY_WRITE, $property); |
58 |
|
|
- $rec->merge_prop(PROPERTY_READ, $property); |
59 |
|
|
+ $repository->merge_prop('GroupsWrite', $property) unless $repository->prop('GroupsWrite'); |
60 |
|
|
+ $repository->merge_prop('GroupsRead', $property) unless $repository->prop('GroupsRead'); |
61 |
|
|
|
62 |
|
|
} |
63 |
|
|
- |
64 |
|
|
} |