/***************************************************************************

    supportware
    Copyright (C) 2001-2008 by c.holzheuer
    c.holzheuer@sourceworx.org

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

***************************************************************************/


#include <ddaccessmanager.h>
#include <ddconfig.h>


/**
	
*/

ddaccessmanager::ddaccessmanager()
{
	_accessmap[ "usr_is_guest" ]  				= 1;
  _accessmap[ "usr_is_member" ]  				= 2;
	_accessmap[ "usr_is_moderator" ]  		= 4;
	_accessmap[ "usr_is_admin" ]  				= 8;
	_accessmap[ "usr_is_root" ]  					= 16;
	_accessmap[ "usr_is_registered" ]  		= 30;
	
	_accessmap[ "usr_can_edit_msg" ]  		= 32;
	_accessmap[ "usr_can_edit_news" ]  		= 64;		
	_accessmap[ "usr_can_edit_usr" ]  		= 128;
	_accessmap[ "usr_can_edit_sale" ]  		= 256;		
	_accessmap[ "usr_can_edit_comment" ] 	= 512;
	_accessmap[ "usr_can_edit_vote" ]  		= 1024;
	_accessmap[ "usr_can_edit_drivers" ] 	= 2048;
	_accessmap[ "usr_can_edit_faq" ]  		= 4096;	
	
	_accessmap[ "usr_can_edit_chat" ]  		= 8192;

}


/**

*/

ddaccessmanager::~ddaccessmanager()
{

}



/**
	
*/

int ddaccessmanager::operator[]( const ddstring& key )
{
	return _accessmap[key];	
}


