smauth.service.service
index
e:\spiele\server\css\orangebox\cstrike\addons\eventscripts\smauth\service\service.py

smauth/service/service.py
Version 1.00.001
 
Licensed under:
http://creativecommons.org/licenses/by-nc-nd/3.0/
 
If wish to alter the file/contents or reuse some parts please contact me.
 
(C) [#OMEGA] - K2 2010

 
Modules
       
es
psyco
services
smauth

 
Classes
       
exceptions.Exception(exceptions.BaseException)
InputError
services.auth.AuthorizationService(services.Service)
SMAuthService
smauth.PlayerAccess(__builtin__.object)
PlayerAccess

 
class InputError(exceptions.Exception)
    
Method resolution order:
InputError
exceptions.Exception
exceptions.BaseException
__builtin__.object

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Methods inherited from exceptions.Exception:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object at 0x1E1CBBE8>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message
exception message

 
class PlayerAccess(smauth.PlayerAccess)
    
Method resolution order:
PlayerAccess
smauth.PlayerAccess
__builtin__.object

Methods defined here:
__init__(self, steamid)

Methods inherited from smauth.PlayerAccess:
CanTarget(self, userid)
Returns True if the user can target the specified userid with an admin command.
Returns False if the user does not exist or if the userid can not be targeted by the user.
GetImmunity(self)
Returns the immunity, False otherwise
HasFlag(self, adminflag)
Returns True if the user has the specified flag.
Returns False if the user does not exist or if the flag can not be found.
InGroup(self, group)
Returns True if the user is in the specified group.
Returns False if the user does not exist or if the group can not be found.
IsAdmin(self)
Returns True if the user has the basic admin (b) flag, False otherwise.
Returns False if the user does not exist or if the flag can not be found.
IsUser(self)
Returns True if the user with the specified auth is stored in admin files, False otherwise.

Data descriptors inherited from smauth.PlayerAccess:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from smauth.PlayerAccess:
authinfo = None
authtype = None
user = None
userid = None

 
class SMAuthService(services.auth.AuthorizationService)
    
Method resolution order:
SMAuthService
services.auth.AuthorizationService
services.Service
__builtin__.object

Methods defined here:
__init__(self)
getOfflineIdentifier(self, auth_userid)
Returns the steamid of the specified userid.
isIdAuthorized(self, auth_identifier, auth_capability)
This function maps the ES access levels for the given capability to sourcemod access levels. It will use the steamid as identifier - if you wish to authentificate users per ip or name you'll need to use the smauth libary directly.
As such, the following will be applied:
 
UNRESTRICTED = Everyone
IDENTIFIED = Any user present in the sourcemod authentification files
POWERUSER = Any user with a flag (reserved slot access)
ADMIN = Any user with b flag (basic admin access)
ROOT = Any user with z flag (root access)
 
Raises InputError incase the specified capability does not exist.
isUseridAuthorized(self, auth_userid, auth_capability)
See isIdAuthoriszed for more info.
registerCapability(self, auth_capability, auth_recommendedlevel=1)
Registers a new capability.
 
Raises InputError incase the given capability exists.

Data and other attributes inherited from services.auth.AuthorizationService:
ADMIN = 1
IDENTIFIED = 4
POWERUSER = 2
ROOT = 0
UNRESTRICTED = 128

Methods inherited from services.Service:
checkInterfaces(self)

Data descriptors inherited from services.Service:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
load()
unload()

 
Data
        info = {'description': 'Provides auth access to sm file...tags'], 'name': 'Sourcemod Authprovider Service'}