Since Apache Syncope 2.0.3, a new feature is available to easily customize the Enduser UI's form
Since Apache Syncope 2.0.3, a new feature is available to easily customize the Enduser UI's form.
It is the ability to define simple yet powerful rules to customize and edit sections and / or fields (e.g. user attributes) present in the Enduser UI.
One of the main goals of the Enduser UI is to allow, for each deployment, an easy customization, without "writing too much code" or "touching too many files".
By stitching to these guidelines, we decided to centralize the form customization rules as much as possible.
As you might already know (if not you can visit this playground zone), the Enduser UI's form is essentially a wizard composed by seven steps, with purpose of providing a dedicated web-based entry-point for self-registration, self-service and password reset.
The configuration involves just few files; being the Enduser UI an AngularJS application, one of such files is app.js.
By tweaking just a couple of lines in a JSON file, it is possible to turn the default wizardto something like as .
More possibilities are available, though; in particular, about attributes sections (plain, derived and virtual).
The customization can be achieved by making changes to a JSON file, enabled for hot-deploy after each modification: customForm.json.
The content of such file rules the attribute tabs of the wizard, in particular it allows to define:
For example, can quickly become
As you can see, the attribute "firstname" is set as read-only (despite the schema definition not being read-only), and initialized the attribute"ctype" with a default value; all other attributes were simply omitted.
Moreover form customization follows strict security rules in order to avoid some JS hacking and endpoint exploitation.
More details can be found in the official reference guide.
The Enduser UI development never stops: some ideas are already work-in-progress.
Enjoy ;)