Project databases, available in beta in the latest 4D v 17 R-Releases, are now available for production in 4D v18! Among the many changes in 4D v18 is the way user and groups are managed … it’s become much easier, especially deployment. This post will briefly highlight everything you need to know about these changes.
A major IMPROVEMENT
In binary databases, users and groups are used for two very different needs. First to protect the data, but also to protect the source code. In project databases, your entire database is text-based, so there’s no reason to use users and groups to protect the code. This role is delegated to the version control system or to the file/folder access rights system. As a result, users and groups are now stored in a text file named “directory.json”.
For the same reasons, there’s also no longer a need to differentiate Developers from Users. Therefore, both now have the “User” type.
GREAT Enhancements for deployment
By default, the directory file is placed next to the project database so you can deploy it with standard users and groups settings. However, you now also have the possibility to place the directory file next to the data file. In this case, this file is used instead of the database file. And that’s not all! The Get 4D file and File commands now accept the new Directory file constant so you can easily and automatically handle the right file. Yes, you read that right! From now on, you no longer need to backup users and groups outside of the structure and restore them when you want to install an update. This will significantly simplify deployment!
CONVERSION / MIGRATION
The directory file will be automatically generated during project database conversion and placed next to the project settings. If you’ve so far used the BLOB TO USERS command to restore your users and passwords, the command will now generate this directory file, so you don’t have to modify your existing code!
Single user mode
In single-user mode, the users and groups management is completely disabled. The current user is always Designer and it can’t be changed.
Users and groups access rights to the application can be delegated to system. So if you want to mask the Designer name with the system account or your own user name, you just need to call the SET USER ALIAS command!
In client-server mode, Users and Groups are fully operational. You can change the current user, set an alias, change a password, etc. In short, you can continue to do everything you did with a binary database.
The Users and Groups toolbox is accessible in all modes: single-user and client-server. But in single-user mode, the toolbox can only be used to modify the users and groups that will be used in client-server mode.