Written by
  • email
  • twitter
  • linkedin
  • linkedin

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.

What do you mean by 'form customization'?

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.

Let's discover it...

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.

Wizard configuration

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 .

But it is not over...

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:

  1. whether to show or not an attribute
  2. whether an attribute is writable or not (despite of schema definition)
  3. default values (if the attribute has no values yet)

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.

This is only the beginning

The Enduser UI development never stops: some ideas are already work-in-progress.

Enjoy ;)

1 VOTIYes, Excellent!Yes, Excellent!
Ti è stato utile questo articolo?
From Tirasa's Blog
The place where we share what we do, learn and discover day by day.
Go to blog >