home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
ib
/
setups
/
intrabld
/
data.z
/
SECURITY.H
< prev
next >
Wrap
C/C++ Source or Header
|
1996-12-11
|
3KB
|
101 lines
#ifndef _SECURITY_
#define _SECURITY_
//
// Configuration settings
//
#define SM_DATABASE_ALIAS "ibapps"
#define SM_CLASS_LOCATION (_sys.env.home() + "apps\\shared\\")
//
// Entity Types
//
#define SM_ENTITY_USER 0
#define SM_ENTITY_GROUP 1
#define SM_ENTITY_RESOURCE 2
#define SM_ENTITY_POLICY 3
//
// Assignment Types
//
#define SM_ASSIGN_GROUP_USER 0
#define SM_ASSIGN_RESOURCE_USER 1
#define SM_ASSIGN_RESOURCE_GROUP 2
//
// Error codes
//
// Instatiation errors
#define SM_ERROR_BDE_ALIAS_MISSING 101
#define SM_ERROR_INVALID_ENTITY_TYPE 102
// User errors
#define SM_ERROR_INVALID_USERNAME 121
#define SM_ERROR_INVALID_PASSWORD 122
#define SM_ERROR_LOGIN_DISABLED 123
#define SM_ERROR_LOGIN_LOCKOUT 124
#define SM_ERROR_DUPLICATE_USERNAME 125
#define SM_ERROR_PASSWORD_TOO_SHORT 126
#define SM_ERROR_PASSWORD_TOO_LONG 127
// Group errors
#define SM_ERROR_INVALID_GROUPNAME 140
#define SM_ERROR_DUPLICATE_GROUPNAME 141
// Policy errors
#define SM_ERROR_INVALID_POLICYNAME 160
#define SM_ERROR_DUPLICATE_POLICYNAME 161
// Resource errors
#define SM_ERROR_INVALID_RESOURCENAME 180
#define SM_ERROR_DUPLICATE_RESOURCENAME 181
// Rights errors
#define SM_ERROR_NOT_LOGGED_IN 200
#define SM_ERROR_INSUFFICIENT_RIGHTS 201
#define SM_ERROR_CAN_NOT_DELETE_CURRENT_USER 202
#define SM_ERROR_CAN_NOT_DELETE_SYSTEM_ENTITY 203
#define SM_ERROR_CAN_NOT_CHANGE_SYSTEM_ENTITY_TYPE 204
//
// Error messages
//
// Instatiation errors
#define SM_MESSAGE_BDE_ALIAS_MISSING ("BDE alias is not defined: " + SM_DATABASE_ALIAS)
#define SM_MESSAGE_INVALID_ENTITY_TYPE "Invalid entity type"
// User errors
#define SM_MESSAGE_INVALID_USERNAME "Invalid user name"
#define SM_MESSAGE_INVALID_PASSWORD "Invalid password"
#define SM_MESSAGE_LOGIN_DISABLED "User account has been disabled"
#define SM_MESSAGE_LOGIN_LOCKOUT "User account has been locked out"
#define SM_MESSAGE_DUPLICATE_USERNAME "Duplicate user name"
#define SM_MESSAGE_PASSWORD_TOO_SHORT "Password does not meet minimum length requirement"
#define SM_MESSAGE_PASSWORD_TOO_LONG "Password does not meet maximum length requirement"
// Group errors
#define SM_MESSAGE_INVALID_GROUPNAME "Invalid group name"
#define SM_MESSAGE_DUPLICATE_GROUPNAME "Duplicate group name"
// Policy errors
#define SM_MESSAGE_INVALID_POLICYNAME "Invalid policy name"
#define SM_MESSAGE_DUPLICATE_POLICYNAME "Duplicate policy name"
// Resource errors
#define SM_MESSAGE_INVALID_RESOURCENAME "Invalid resource name"
#define SM_MESSAGE_DUPLICATE_RESOURCENAME "Duplicate resource name"
// Rights errors
#define SM_MESSAGE_NOT_LOGGED_IN "Login required to perform this operation"
#define SM_MESSAGE_INSUFFICIENT_RIGHTS "Insufficient rights to perform this operation"
#define SM_MESSAGE_CAN_NOT_DELETE_CURRENT_USER "Can not delete the current user"
#define SM_MESSAGE_CAN_NOT_DELETE_SYSTEM_ENTITY "Can not delete a system entity"
#define SM_MESSAGE_CAN_NOT_CHANGE_SYSTEM_ENTITY_TYPE "Can not change a system entity type"
#endif