Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Reads an access file from the instance home.
Returns name, password, domains, remote_user_mode.

        def readUserAccessFile(filename):
    '''Reads an access file from the instance home.
    Returns name, password, domains, remote_user_mode.
    '''
    environ = os.environ
    instancehome = environ.get('INSTANCE_HOME', None)
    if not instancehome:
        return None

    try:
        f = open(os.path.join(instancehome, filename), 'r')
        line = f.readline()
        f.close()
    except IOError:
        return None

    if line:
        data = line.strip().split(':')
        remote_user_mode = not data[1]
        try:
            ds = data[2].split(' ')
        except:
            ds = []
        return data[0], data[1], ds, remote_user_mode
    else:
        return None
        


src/z/o/Zope2-2.13.22/src/OFS/userfolder.py   Zope2(Download)
from AccessControl.rolemanager import DEFAULTMAXLISTUSERS
from AccessControl import userfolder as accesscontrol_userfolder
from AccessControl.users import readUserAccessFile
from AccessControl.users import _remote_user_mode
from AccessControl.users import emergency_user
        """
        if len(self.data) <= 1:
            info = readUserAccessFile('inituser')
            if info:
                import App.config

src/z/o/Zope-HEAD/src/OFS/userfolder.py   Zope(Download)
from AccessControl.rolemanager import DEFAULTMAXLISTUSERS
from AccessControl import userfolder as accesscontrol_userfolder
from AccessControl.users import readUserAccessFile
from AccessControl.users import _remote_user_mode
from AccessControl.users import emergency_user
        """
        if len(self.data) <= 1:
            info = readUserAccessFile('inituser')
            if info:
                import App.config