#include <taccessvalidator.h>
|
void | addRules (int type, const QString &key, const QStringList &actions, bool allow) |
|
The TAccessValidator class provides validation of user access.
The TAccessValidator class provides the functionality of a validation for form data.
- See also
- TAbstractUser class
◆ TAccessValidator()
TAccessValidator::TAccessValidator |
( |
| ) |
|
◆ ~TAccessValidator()
virtual TAccessValidator::~TAccessValidator |
( |
| ) |
|
|
inlinevirtual |
◆ addRules()
void TAccessValidator::addRules |
( |
int |
type, |
|
|
const QString & |
key, |
|
|
const QStringList & |
actions, |
|
|
bool |
allow |
|
) |
| |
|
protected |
Added a access rule to the list.
◆ clear()
void TAccessValidator::clear |
( |
| ) |
|
Removes all access rules from the list.
◆ setAllowDefault()
void TAccessValidator::setAllowDefault |
( |
bool |
allow = true | ) |
|
|
inline |
Sets the default rule to allow all users to access to all actions if allow is true; otherwise sets to deny any user to access to any action.
The default rule is true.
◆ setAllowGroup() [1/2]
void TAccessValidator::setAllowGroup |
( |
const QString & |
groupKey, |
|
|
const QString & |
action |
|
) |
| |
Sets to allow a group with groupKey to access to the action action.
◆ setAllowGroup() [2/2]
void TAccessValidator::setAllowGroup |
( |
const QString & |
groupKey, |
|
|
const QStringList & |
actions |
|
) |
| |
Sets to allow a group with groupKey to access to the actions actions.
◆ setAllowUnauthenticatedUser() [1/2]
void TAccessValidator::setAllowUnauthenticatedUser |
( |
const QString & |
action | ) |
|
Sets to allow an unauthenticated user with the identity identityKey to access to the action action.
◆ setAllowUnauthenticatedUser() [2/2]
void TAccessValidator::setAllowUnauthenticatedUser |
( |
const QStringList & |
actions | ) |
|
Sets to allow an unauthenticated with the identity identityKey to access to the actions actions.
◆ setAllowUser() [1/2]
void TAccessValidator::setAllowUser |
( |
const QString & |
identityKey, |
|
|
const QString & |
action |
|
) |
| |
Sets to allow a user with the identity identityKey to access to the action action.
◆ setAllowUser() [2/2]
void TAccessValidator::setAllowUser |
( |
const QString & |
identityKey, |
|
|
const QStringList & |
actions |
|
) |
| |
Sets to allow a user with the identity identityKey to access to the actions actions.
◆ setDenyDefault()
void TAccessValidator::setDenyDefault |
( |
bool |
deny = true | ) |
|
|
inline |
Sets the default rule to deny any user to access to any action if deny is true; otherwise sets to allow all users to access to all actions.
◆ setDenyGroup() [1/2]
void TAccessValidator::setDenyGroup |
( |
const QString & |
groupKey, |
|
|
const QString & |
action |
|
) |
| |
Sets to deny a group with groupKey to access to the action action.
◆ setDenyGroup() [2/2]
void TAccessValidator::setDenyGroup |
( |
const QString & |
groupKey, |
|
|
const QStringList & |
actions |
|
) |
| |
Sets to deny a group with groupKey to access to the actions actions.
◆ setDenyUnauthenticatedUser() [1/2]
void TAccessValidator::setDenyUnauthenticatedUser |
( |
const QString & |
action | ) |
|
Sets to deny an unauthenticated with the identity identityKey to access to the action action.
◆ setDenyUnauthenticatedUser() [2/2]
void TAccessValidator::setDenyUnauthenticatedUser |
( |
const QStringList & |
actions | ) |
|
Sets to deny an unauthenticated with the identity identityKey to access to the actions actions.
◆ setDenyUser() [1/2]
void TAccessValidator::setDenyUser |
( |
const QString & |
identityKey, |
|
|
const QString & |
action |
|
) |
| |
Sets to deny a user with the identity identityKey to access to the action action.
◆ setDenyUser() [2/2]
void TAccessValidator::setDenyUser |
( |
const QString & |
identityKey, |
|
|
const QStringList & |
actions |
|
) |
| |
Sets to deny a user with the identity identityKey to access to the actions actions.
◆ validate()
Returns true if the user user is allowed to access to the requested action; otherwise returns false.
◆ accessRules
◆ allowDefault
bool TAccessValidator::allowDefault {true} |
|
protected |
The documentation for this class was generated from the following files: