4Suite API Documentation

Module Ft.Server.Server.Commands.CommandUtil

Functions used by various commands
Copyright 2003 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/
Functions:
Globals:

Functions

GetRepository(options, cmdName)
Given a dictionary of parsed command-line options (see FancyGetOpt), reads a repo config file (which may be identified by the 'config-file' key in the options dict, and defaults to the value of the environment variable FTSERVER_CONFIG_FILE), obtaining the config file's contents as a dictionary returned by Ft.Server.Server.Lib.ConfigFile.Read(), and creating a properties dictionary that is the value of just one of the keys from the original dictionary (the key is either the 'core-id' option, the value of environment variable FTSS_CORE_ID, or 'Core'). If a username and password hash were not found in the options dict, prompts for them. Uses username and password hash to obtain a repo access object from the local repository (via SCore.GetRepository()). Checks ACL in the repo to see if the command with the given name can be run by the user, raising an exception if it can't or if the name doesn't correspond to a command in the repo. Returns a tuple of: username, password hash, config file properties dictionary, repo access object.
Used by pretty much every '4ss' and '4ss_manager' command.

Globals

PasswordManager = <Ft.Server.Server.Commands.CommandUtil._PasswordManager instance>