From 1b5123d5250d2bc8516510d416d655936898f5e6 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 22 Oct 2013 19:13:20 +0200 Subject: [PATCH] Migrate user props from AjxpHomeDir to PydioHomeDir --- root/etc/e-smith/db/accounts/migrate/Ajaxplorer2Pydio | 7 +++++++ root/etc/e-smith/events/actions/pydio-user-rights | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/root/etc/e-smith/db/accounts/migrate/Ajaxplorer2Pydio b/root/etc/e-smith/db/accounts/migrate/Ajaxplorer2Pydio index 810a265..112c046 100644 --- a/root/etc/e-smith/db/accounts/migrate/Ajaxplorer2Pydio +++ b/root/etc/e-smith/db/accounts/migrate/Ajaxplorer2Pydio @@ -12,4 +12,11 @@ foreach my $share ($DB->get_all_by_prop(type => 'share')){ PydioIndexer => $indexer ); } +foreach my $user ($DB->get_all_by_prop(type => 'user')){ + my $home = $DB->get_prop_and_delete($user->key, 'AjxpHomeDir'); + next unless defined ($home); + $user->merge_props( + PydioHomeDir => $home + ); +} } diff --git a/root/etc/e-smith/events/actions/pydio-user-rights b/root/etc/e-smith/events/actions/pydio-user-rights index a270cff..f1f083e 100644 --- a/root/etc/e-smith/events/actions/pydio-user-rights +++ b/root/etc/e-smith/events/actions/pydio-user-rights @@ -111,7 +111,7 @@ if ($homedir eq 'enabled'){ elsif ($homedir eq 'users'){ foreach ($a->users){ my $name = $_->key; - if (($_->prop('AjxpHomeDir') || 'disabled') eq 'enabled'){ + if (($_->prop('PydioHomeDir') || 'disabled') eq 'enabled'){ set_user_acl($name); } else{