mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-11 05:17:41 +03:00
This reverts commit 41756a9de3
.
This commit is contained in:
parent
6b0971415b
commit
d0eb7aead4
@ -38,16 +38,12 @@ class AclManager : public Callbackable, public ActionListener
|
||||
public:
|
||||
|
||||
/**
|
||||
*
|
||||
* @param _db pointer to the DB
|
||||
* @param zone_id of the Zone
|
||||
* @param is_federation_enabled true is this oned is part of a federation
|
||||
* @param is_federation_slave true is this oned is a federation slave. It
|
||||
* it is true, it will reload periodically rules from the DB
|
||||
* @param refresh_cache will reload periodically rules from the DB
|
||||
* @param timer_period period to reload the rules
|
||||
*/
|
||||
AclManager(SqlDB * _db, int zone_id, bool is_federation_enabled,
|
||||
bool is_federation_slave, time_t timer);
|
||||
AclManager(SqlDB * _db, int zone_id, bool _refresh_cache, time_t timer);
|
||||
|
||||
virtual ~AclManager();
|
||||
|
||||
@ -214,8 +210,7 @@ protected:
|
||||
* from DB)
|
||||
*/
|
||||
AclManager(int _zone_id)
|
||||
:zone_id(_zone_id), db(0),lastOID(0), is_federation_enabled(false),
|
||||
is_federation_slave(false)
|
||||
:zone_id(_zone_id), db(0),lastOID(0), is_federation_slave(false)
|
||||
{
|
||||
pthread_mutex_init(&mutex, 0);
|
||||
};
|
||||
@ -420,11 +415,6 @@ private:
|
||||
// Refresh loop thread
|
||||
// ----------------------------------------
|
||||
|
||||
/**
|
||||
* Flag to know if this oned is part of a federation
|
||||
*/
|
||||
bool is_federation_enabled;
|
||||
|
||||
/**
|
||||
* Flag to refresh the cache periodically
|
||||
*/
|
||||
|
@ -51,11 +51,9 @@ int AclManager::init_cb(void *nil, int num, char **values, char **names)
|
||||
AclManager::AclManager(
|
||||
SqlDB * _db,
|
||||
int _zone_id,
|
||||
bool _is_federation_enabled,
|
||||
bool _is_federation_slave,
|
||||
time_t _timer_period)
|
||||
:zone_id(_zone_id), db(_db), lastOID(-1),
|
||||
is_federation_enabled(_is_federation_enabled),
|
||||
is_federation_slave(_is_federation_slave), timer_period(_timer_period)
|
||||
{
|
||||
ostringstream oss;
|
||||
@ -529,11 +527,6 @@ int AclManager::add_rule(long long user, long long resource, long long rights,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!is_federation_enabled)
|
||||
{
|
||||
zone = AclRule::INDIVIDUAL_ID | zone_id;
|
||||
}
|
||||
|
||||
lock();
|
||||
|
||||
if (lastOID == INT_MAX)
|
||||
|
@ -701,8 +701,7 @@ void Nebula::start(bool bootstrap_only)
|
||||
// ---- ACL Manager ----
|
||||
try
|
||||
{
|
||||
aclm = new AclManager(db, zone_id, is_federation_enabled(),
|
||||
is_federation_slave(), timer_period);
|
||||
aclm = new AclManager(db, zone_id, is_federation_slave(), timer_period);
|
||||
}
|
||||
catch (bad_alloc&)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user