eAccessLevelHolder Class Reference

class managing access levels. More...

#include <ePlayer.h>

Inheritance diagram for eAccessLevelHolder:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 eAccessLevelHolder ()
tAccessLevel GetAccessLevel () const
void SetAccessLevel (tAccessLevel level)

Private Attributes

tAccessLevel accessLevel
 admin access level of the current user


Detailed Description

class managing access levels.

Definition at line 129 of file ePlayer.h.


Constructor & Destructor Documentation

eAccessLevelHolder::eAccessLevelHolder (  ) 

Definition at line 76 of file ePlayer.cpp.

References accessLevel, and tAccessLevel_Default.

00077 {
00078     accessLevel = tAccessLevel_Default;
00079 }


Member Function Documentation

tAccessLevel eAccessLevelHolder::GetAccessLevel (  )  const [inline]

Definition at line 134 of file ePlayer.h.

References accessLevel.

Referenced by eVoter::HandleChat(), ePlayerNetID::IsLoggedIn(), se_ChatMsg(), se_ChatShuffle(), se_ChatTeam(), se_GetAccessLevel(), se_IsNameTaken(), se_ListPlayers(), ePlayerNetID::TeamChangeAllowed(), ePlayerNetID::Update(), and ePlayerNetID::UpdateName().

00134 { return accessLevel; }

Here is the caller graph for this function:

void eAccessLevelHolder::SetAccessLevel ( tAccessLevel  level  ) 

Definition at line 81 of file ePlayer.cpp.

References accessLevel, con, tCurrentAccessLevel::GetAccessLevel(), and st_Breakpoint().

Referenced by ePlayerNetID::BeLoggedIn(), and ePlayerNetID::BeNotLoggedIn().

00082 {
00083     // sanity check. The access level must not be set higher than that of the current context.
00084     // since accessLevel is private, all access level changes need to run over this function;
00085     // it is therefore impossible to get access level escalation bugs without memory overwrites
00086     // or, of course, evil intentions.
00087     if ( level < tCurrentAccessLevel::GetAccessLevel() )
00088     {
00089         con << "INTERNAL ERROR, security violation attempted. Clamping it.\n";
00090         st_Breakpoint();
00091         accessLevel = tCurrentAccessLevel::GetAccessLevel();
00092     }
00093 
00094     accessLevel = level;
00095 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

tAccessLevel eAccessLevelHolder::accessLevel [private]

admin access level of the current user

Definition at line 138 of file ePlayer.h.

Referenced by eAccessLevelHolder(), GetAccessLevel(), and SetAccessLevel().


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:21:15 2008 for Armagetron Advanced by  doxygen 1.5.4