1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Change default ACL rules initialization to the new operations

This commit is contained in:
Carlos Martín 2011-12-30 07:54:27 -08:00
parent cd9124c970
commit ba3f1ec6bf

View File

@ -67,17 +67,22 @@ AclManager::AclManager(SqlDB * _db) : db(_db), lastOID(-1)
// Add a default rules for the ACL engine
string error_str;
// Users in group USERS can create and look at standard resources
// @1 VM+NET+IMAGE+TEMPLATE/* CREATE+INFO_POOL_MINE
add_rule(0x0000000200000001LL,
0x000002d400000000LL,
0x0000000000000041LL, error_str);
// Users in group USERS can create standard resources
// @1 VM+NET+IMAGE+TEMPLATE/* CREATE
add_rule(AclRule::GROUP_ID | 1,
AclRule::ALL_ID | AuthRequest::VM | AuthRequest::NET |
AuthRequest::IMAGE | AuthRequest::TEMPLATE,
AuthRequest::CREATE,
error_str);
// Users in USERS can deploy VMs in any HOST
// @1 HOST/* USE
add_rule(0x0000000200000001LL,
0x0000002400000000LL,
0x0000000000000004LL, error_str);
// @1 HOST/* MANAGE
add_rule(AclRule::GROUP_ID | 1,
AclRule::ALL_ID | AuthRequest::HOST,
AuthRequest::MANAGE,
error_str);
}
}