From OpenSCADAWiki
(Importing a new version from external source) |
(Importing a new version from external source) |
||
Line 1: | Line 1: | ||
'''Public methods:''' | '''Public methods:''' | ||
− | * ''TUser( const string &name, const string &db, TElem *el );'' — | + | * ''TUser( const string &name, const string &db, TElem *el );'' — Initialising constructor. |
* ''string name( );'' — User name. | * ''string name( );'' — User name. | ||
* ''string descr( );'' — User description. | * ''string descr( );'' — User description. | ||
Line 8: | Line 8: | ||
* ''bool sysItem( );'' — Sign of the system user. | * ''bool sysItem( );'' — Sign of the system user. | ||
* ''bool auth( const string &pass, string *hash = NULL );'' — Check the authenticity of the user by the password ''pass''. The password hash, if it is supports, placing into the ''hash''. | * ''bool auth( const string &pass, string *hash = NULL );'' — Check the authenticity of the user by the password ''pass''. The password hash, if it is supports, placing into the ''hash''. | ||
+ | * ''int permitCmpr( const string &user );'' — Comparing the ''user'' permition with the user object. Returns -1 for lesser, 1 for greater and 0 for even permition. | ||
* ''string DB( );'' — User DB address. | * ''string DB( );'' — User DB address. | ||
* ''string tbl( );'' — Address of the table of user's DB. | * ''string tbl( );'' — Address of the table of user's DB. |
Revision as of 14:39, 26 April 2020
Public methods:
- TUser( const string &name, const string &db, TElem *el ); — Initialising constructor.
- string name( ); — User name.
- string descr( ); — User description.
- string longDescr( ); — User long description.
- string picture( ); — User image.
- string lang( ); — User language, only into the dynamic translation text variables mode.
- bool sysItem( ); — Sign of the system user.
- bool auth( const string &pass, string *hash = NULL ); — Check the authenticity of the user by the password pass. The password hash, if it is supports, placing into the hash.
- int permitCmpr( const string &user ); — Comparing the user permition with the user object. Returns -1 for lesser, 1 for greater and 0 for even permition.
- string DB( ); — User DB address.
- string tbl( ); — Address of the table of user's DB.
- string fullDB( ); — The full name of the table of user's DB.
- void setDescr( const string &vl ); — Setting user's description to vl.
- void setLongDescr( const string &vl ); — Setting user's long description to vl.
- void setPicture( const string &pct ); — Setting user's image to pct.
- void setLang( const string &vl ); — Setting user's language to vl.
- void setPass( const string &pass ); — Setting user's password to pass.
- void setSysItem( bool vl ); — Setting the sign of system user to vl.
- void setDB( const string &vl ); — Setting user's DB address.
- TSeсurity &owner( ) const; — "Security" subsystem - the owner of the user.