TreeFrogFramework: TAccessValidator Class Reference
#include <taccessvalidator.h>
Public Member Functions | |
| TAccessValidator () | |
| virtual | ~TAccessValidator () |
| void | setAllowDefault (bool allow=true) |
| void | setDenyDefault (bool deny=true) |
| void | setAllowGroup (const QString &groupKey, const QString &action) |
| void | setAllowGroup (const QString &groupKey, const QStringList &actions) |
| void | setDenyGroup (const QString &groupKey, const QString &action) |
| void | setDenyGroup (const QString &groupKey, const QStringList &actions) |
| void | setAllowUser (const QString &identityKey, const QString &action) |
| void | setAllowUser (const QString &identityKey, const QStringList &actions) |
| void | setDenyUser (const QString &identityKey, const QString &action) |
| void | setDenyUser (const QString &identityKey, const QStringList &actions) |
| void | setAllowUnauthenticatedUser (const QString &action) |
| void | setAllowUnauthenticatedUser (const QStringList &actions) |
| void | setDenyUnauthenticatedUser (const QString &action) |
| void | setDenyUnauthenticatedUser (const QStringList &actions) |
| void | clear () |
| virtual bool | validate (const TAbstractUser *user, const TActionController *controller) const |
Protected Member Functions | |
| 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 | ( | ) |
Constructor.
◆ ~TAccessValidator()
|
inlinevirtual |
◆ addRules()
|
protected |
Added a access rule to the list.
◆ clear()
| void TAccessValidator::clear | ( | ) |
Removes all access rules from the list.
◆ setAllowDefault()
|
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()
|
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: