Tech Tip: 4D Ajax Framework, Designer user, and the Control Panel
PRODUCT: 4D Web 2.0 Pack | VERSION: 1.1 | PLATFORM: Mac & Win
Published On: July 6, 2007
By default, when logging into the 4D Ajax Framework, the only user with access to the Control Panel is 'Administrator'. This can cause confusion for 4D Developers who are used to making development changes as the Designer user.
To allow different users to have administration privileges, and thus access to the Control Panel in the 4D Ajax Framework, it is necessary to create your own login system. This can be done by following these steps in the DAX_DevHook_Login method:
- Insert code to validate the Username and Password.
- If the Username and Password are valid pass the username into the method DAX_Session_UserName.
- If this user should have access to the Control Panel pass "TRUE" into the method DAX_Session_Admin.
- If you want to manage your own session ID, make sure that you pass the session ID into the method DAX_Session_SessionID
- If you validate the user, set the variable named $loggedIn_b to TRUE
- If the user failed validation pass an error code into the method DAX_Dev_Session_Error and set the variable named $loggedIn_b to FALSE.