LibreOffice
LibreOffice 5.4 SDK C/C++ API Reference
|
Encapsulate security information for one user. More...
#include <security_decl.hxx>
Public Member Functions | |
Security () | |
~Security () | |
bool | logonUser (const rtl::OUString &strName, const rtl::OUString &strPasswd) |
get the security information for one user. More... | |
bool | logonUser (const rtl::OUString &strName, const rtl::OUString &strPasswd, const rtl::OUString &strFileServer) |
get the security information for one user. More... | |
bool | getUserIdent (rtl::OUString &strIdent) const |
get the ident of the logged in user. More... | |
bool | getUserName (rtl::OUString &strName, bool bIncludeDomain=true) const |
get the name of the logged in user. More... | |
bool | getHomeDir (rtl::OUString &strDirectory) const |
get the home directory of the logged in user. More... | |
bool | getConfigDir (rtl::OUString &strDirectory) const |
get the directory for configuration data of the logged in user. More... | |
bool | isAdministrator () const |
Query if the user who is logged in has administrator rights. More... | |
oslSecurity | getHandle () const |
Returns the underlying oslSecurity handle. More... | |
Protected Attributes | |
oslSecurity | m_handle |
Encapsulate security information for one user.
A object of this class is used to execute a process with the rights an security options of a specified user.
|
inline |
|
inline |
|
inline |
get the directory for configuration data of the logged in user.
[out] | strDirectory | is the OUString which returns the directory name |
True | if any user is successfully logged in |
False | if user is not logged in |
|
inline |
Returns the underlying oslSecurity handle.
|
inline |
get the home directory of the logged in user.
[out] | strDirectory | is the OUString which returns the directory name |
True | if any user is successfully logged in |
False | if user is not logged in |
|
inline |
get the ident of the logged in user.
[out] | strIdent | is the OUString which returns the name |
True | if any user is successfully logged in |
False | no user logged in |
|
inline |
get the name of the logged in user.
[out] | strName | is the OUString which returns the name |
[in] | bIncludeDomain | Include the Domain name (like "ORG\username"). Affects Windows only. This parameter is available since LibreOffice 5.2. |
True | if any user is successfully logged in |
False | if no user is logged in |
|
inline |
Query if the user who is logged in has administrator rights.
True | if the user has administrator rights |
False | if the user does not have admin rights |
|
inline |
get the security information for one user.
The underlying operating system is asked for this information.
[in] | strName | denotes the name of the user |
[in] | strPasswd | denotes the password of this user |
True,if | the specified user is known by the underlying operating system |
False | unknown user |
|
inline |
get the security information for one user.
This method will try to login the user at the denoted file server. If a network resource named \\server\username exists and this resource could be connected by this user, the methos will return true and getHomeDir will return \\server\username.
[in] | strName | denotes the name of the user |
[in] | strPasswd | denotes the password of this user |
[in] | strFileServer | denotes the file server to login to |
True | if the specified user is known by the file server and they could be connected |
False | if the user is not known by the file server |
|
protected |