From 0e69749569ce09c67697e4668e569fb01ccae27c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Thu, 12 Jan 2012 12:22:01 +0100 Subject: [PATCH] Feature #862: Update onedb migrator for new delete authorization from commit:f1478e680ef30dc13dfee37d912d948c3c636647 --- src/onedb/3.1.80_to_3.1.85.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/onedb/3.1.80_to_3.1.85.rb b/src/onedb/3.1.80_to_3.1.85.rb index 3e766e2701..b6c1ee9adb 100644 --- a/src/onedb/3.1.80_to_3.1.85.rb +++ b/src/onedb/3.1.80_to_3.1.85.rb @@ -40,6 +40,21 @@ module Migrator # 0x400 "CHAUTH" } + USER_GROUP_RIGHTS = + { + 0x1 => 0x8, # "CREATE" => "CREATE" + 0x2 => 0x4, # "DELETE" => "ADMIN" + 0x4 => 0x1, # "USE" => "USE" + 0x8 => 0x2, # "MANAGE" => "MANAGE" + 0x10 => 0x1, # "INFO" => "USE" +# 0x20 "INFO_POOL" +# 0x40 "INFO_POOL_MINE" + 0x80 => 0x1, # "INSTANTIATE" => "USE" + 0x100 => 0x2, # "CHOWN" => "MANAGE" + 0x200 => 0x4, # "DEPLOY" => "ADMIN" + 0x400 => 0x4 # "CHAUTH" => "ADMIN" + } + RIGHTS = { 0x1 => 0x8, # "CREATE" => "CREATE" @@ -74,6 +89,8 @@ module Migrator if ( row[:resource] & 0x2000000000 != 0 ) # Resource contains HOST rights_hash = HOST_RIGHTS + elsif ( row[:resource] & 0x0000050000000000 != 0 ) # Resource contains USER or GROUP + rights_hash = USER_GROUP_RIGHTS else rights_hash = RIGHTS end