Server settings → Plugins: switches say Enabled, and the identifier registry's schemes can be defined in JSON, in a dialog #311

Closed
opened 2026-09-29 11:26:41 +00:00 by tiagoagueda · 0 comments
Owner

From the interface review of 2026-09-29:

  • A plugin's switch reads Enabled and Disabled, not On and Off.
  • The built-in Identifiers plugin gets a button that opens its settings in a dialog, not on a new page. There an administrator defines, in JSON, the identifiers it provides and their validation rules.

The wording

server/plugins.html labels the switch On (:86), and so does person_plugins.html (:77); a repository that is off shows an Off badge (:129, :214). A switch's label names the thing it switches and the switch shows the state, so the label becomes Enabled, the checked state says whether it is, and the badges say Disabled. This changes a string in every catalogue.

On the same page, the amber "set in the environment" pill (:132) is still a hand-written rounded-full bg-amber-100 … span that #291 missed. It becomes a badge with a tone.

The identifier registry

Today a scheme is Python (plugins/identifiers/schemes.py, #298): a key, a label, the subjects it identifies, a pattern, an optional checksum function, a link template, and the paths it accepts. The request is for an instance to define schemes of its own without writing a plugin.

What has to be settled:

  • What JSON can say. A key, a label per language, the subjects, a pattern and a link template. A checksum is code, so JSON can name one of the algorithms already written (ISO 7064 mod 11-2, which ORCID uses, and mod 97-10, which an LEI uses) but cannot supply a new one.
  • An administrator's pattern is run against every value everybody types. Python's re has no time limit, and a pattern with nested repetition can take minutes on a crafted value. The options are a restricted pattern language, a length cap on the values checked, or the third-party regex module with its timeout.
  • Built-in schemes and custom ones. Whether the built-ins can be changed or only added to, and what happens to identifiers already stored under a scheme somebody deletes: they must survive, shown as their raw value.
  • Where the definitions are kept. In the database, per instance, and in the backup.
  • The dialog is the one from #303, with a page as its scripts-off path. The JSON goes in a <textarea> that is checked on save, with any error shown at the line it is on.

Done when

  • The switch wording is changed, in the working catalogues.
  • An administrator can add a scheme in JSON, see it offered on Your details and on a company's form, and have a value refused by its pattern. A pathological pattern cannot hang a request.
From the interface review of 2026-09-29: - A plugin's switch reads *Enabled* and *Disabled*, not *On* and *Off*. - The built-in *Identifiers* plugin gets a button that opens its settings in a dialog, not on a new page. There an administrator defines, in JSON, the identifiers it provides and their validation rules. ## The wording `server/plugins.html` labels the switch *On* (`:86`), and so does `person_plugins.html` (`:77`); a repository that is off shows an *Off* badge (`:129`, `:214`). A switch's label names the thing it switches and the switch shows the state, so the label becomes *Enabled*, the checked state says whether it is, and the badges say *Disabled*. This changes a string in every catalogue. On the same page, the amber "set in the environment" pill (`:132`) is still a hand-written `rounded-full bg-amber-100 …` span that #291 missed. It becomes a `badge` with a tone. ## The identifier registry Today a scheme is Python (`plugins/identifiers/schemes.py`, #298): a key, a label, the subjects it identifies, a pattern, an optional checksum function, a link template, and the paths it accepts. The request is for an instance to define schemes of its own without writing a plugin. What has to be settled: - **What JSON can say.** A key, a label per language, the subjects, a pattern and a link template. A checksum is code, so JSON can name one of the algorithms already written (ISO 7064 mod 11-2, which ORCID uses, and mod 97-10, which an LEI uses) but cannot supply a new one. - **An administrator's pattern is run against every value everybody types.** Python's `re` has no time limit, and a pattern with nested repetition can take minutes on a crafted value. The options are a restricted pattern language, a length cap on the values checked, or the third-party `regex` module with its timeout. - **Built-in schemes and custom ones.** Whether the built-ins can be changed or only added to, and what happens to identifiers already stored under a scheme somebody deletes: they must survive, shown as their raw value. - **Where the definitions are kept.** In the database, per instance, and in the backup. - **The dialog** is the one from #303, with a page as its scripts-off path. The JSON goes in a `<textarea>` that is checked on save, with any error shown at the line it is on. ## Done when - The switch wording is changed, in the working catalogues. - An administrator can add a scheme in JSON, see it offered on *Your details* and on a company's form, and have a value refused by its pattern. A pathological pattern cannot hang a request.
tiagoagueda added this to the 0.5.0 milestone 2026-09-29 11:26:41 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo#311
No description provided.