-
Notifications
You must be signed in to change notification settings - Fork 36
CustomUserTable
Carlo Barazzetta edited this page Jan 27, 2017
·
1 revision
If you are using the DB Authenticator as explained here and here you can customize the SQL query used by the authenticator to fetch user data. This is useful in two kinds of (potentially overlapping) scenarios.
- You have an existing (legacy) database with its user/password table which you want to keep and use in your Kitto application.
- You want to select additional user data that you then use in views, etc.
Just add the ReadUserCommandText
property according to the instructions in the link above (which includes a simple example).
Here is a more complex example extracted from a real-world project:
Auth: DB
IsClearPassword: True
ReadUserCommandText: |
select
WEB_USER_NAME as USER_NAME, WEB_PASSWORD as PASSWORD_HASH, WEB_ENABLED as IS_ACTIVE,
LAST_NAME + ' ' + NAME as FULL_NAME, ID as PERSON_ID,
coalesce((select top 1 1 from ADMIN_OPERATOR
where PERSON.ID = ADMIN_OPERATOR.PERSON_ID), 0) as IS_ADMIN_OPERATOR
from PERSON
where (WEB_USER_NAME = :P1) and (WEB_ENABLED = 1)
The additional columns other than the required USER_NAME, PASSWORD_HASH and IS_ACTIVE are custom columns used throughout the application by means of macros such as %Auth:IS_ADMIN_OPERATOR%
.
- Kitto at a glance
- Getting started
- Setup
-
Basic concepts
- Basic Materials
- Controllers
- Features
- Kitto Enterprise
- Examples
- Developer's guide
- Library reference
- Frequently Asked Questions
- Kitto tips & tricks and how-tos
- Other information