Encapsulate security information for one user.
More...
#include <security_decl.hxx>
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.
- See also
- Process::executeProcess
◆ Security()
osl::Security::Security |
( |
| ) |
|
|
inline |
◆ ~Security()
osl::Security::~Security |
( |
| ) |
|
|
inline |
◆ getConfigDir()
bool osl::Security::getConfigDir |
( |
rtl::OUString & |
strDirectory | ) |
const |
|
inline |
get the directory for configuration data of the logged in user.
- Parameters
-
[out] | strDirectory | is the OUString which returns the directory name |
- Return values
-
True | if any user is successfully logged in |
False | if user is not logged in |
◆ getHandle()
Returns the underlying oslSecurity handle.
◆ getHomeDir()
bool osl::Security::getHomeDir |
( |
rtl::OUString & |
strDirectory | ) |
const |
|
inline |
get the home directory of the logged in user.
- Parameters
-
[out] | strDirectory | is the OUString which returns the directory name |
- Return values
-
True | if any user is successfully logged in |
False | if user is not logged in |
◆ getUserIdent()
bool osl::Security::getUserIdent |
( |
rtl::OUString & |
strIdent | ) |
const |
|
inline |
get the ident of the logged in user.
- Parameters
-
[out] | strIdent | is the OUString which returns the name |
- Return values
-
True | if any user is successfully logged in |
False | no user logged in |
◆ getUserName()
bool osl::Security::getUserName |
( |
rtl::OUString & |
strName, |
|
|
bool |
bIncludeDomain = true |
|
) |
| const |
|
inline |
get the name of the logged in user.
- Parameters
-
[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. |
- Return values
-
True | if any user is successfully logged in |
False | if no user is logged in |
◆ isAdministrator()
bool osl::Security::isAdministrator |
( |
| ) |
const |
|
inline |
Query if the user who is logged in has administrator rights.
- Return values
-
True | if the user has administrator rights |
False | if the user does not have admin rights |
◆ logonUser() [1/2]
get the security information for one user.
The underlying operating system is asked for this information.
- Parameters
-
[in] | strName | denotes the name of the user |
[in] | strPasswd | denotes the password of this user |
- Return values
-
True,if | the specified user is known by the underlying operating system |
False | unknown user |
◆ logonUser() [2/2]
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 method will return true and getHomeDir
will return \\server\username.
- Parameters
-
[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 |
- Return values
-
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 |
◆ m_handle
The documentation for this class was generated from the following files: