From OpenSCADAWiki
(Importing a new version from external source) |
(Importing a new version from external source) |
||
Line 9: | Line 9: | ||
* ''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. | * ''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( bool qTop = false );'' — User storage address, ''qTop'' for the storage queue top. | + | * ''string DB( bool qTop = false ) const;'' — User storage address, ''qTop'' for the storage queue top. |
− | * ''string tbl( );'' — Address of the table of user's storage. | + | * ''string tbl( ) const;'' — Address of the table of user's storage. |
− | * ''string fullDB( bool qTop = false );'' — Full name of the table of user's storage, ''qTop'' for the storage queue top. | + | * ''string fullDB( bool qTop = false ) const;'' — Full name of the table of user's storage, ''qTop'' for the storage queue top. |
* ''void setDescr( const string &vl );'' — Setting user's description to ''vl''. | * ''void setDescr( const string &vl );'' — Setting user's description to ''vl''. | ||
* ''void setLongDescr( const string &vl );'' — Setting user's long description to ''vl''. | * ''void setLongDescr( const string &vl );'' — Setting user's long description to ''vl''. |
Revision as of 14:28, 17 September 2021
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( bool qTop = false ) const; — User storage address, qTop for the storage queue top.
- string tbl( ) const; — Address of the table of user's storage.
- string fullDB( bool qTop = false ) const; — Full name of the table of user's storage, qTop for the storage queue top.
- 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, bool qTop = false ); — Setting the user's storage address, qTop for the storage queue top.
- TSeсurity &owner( ) const; — "Security" subsystem - the owner of the user.