j3k0 / ganomede-admin

Ganomede administration interface
0 stars 0 forks source link

Manage usermeta #86

Closed j3k0 closed 2 years ago

j3k0 commented 3 years ago

Configure the list with environment variable: USER_METADATA_LIST.

USER_METADATA_LIST=country,locale,$blocked

j3k0 commented 3 years ago

In terms of code, things are organized this way.

The frontend asks the admin backend about the data with /admin/v1/api/users/jeko, so you have to update this endpoint to return the extra user metadata (generally referred to as usermeta).

Then you'll have to create another endpoint to be able to change the value of an usermeta. This endpoint will, in turn, make a request the the ganomede-usermeta service, which is already linked with the administration interface.

Notice that the admin interface already reads some user metadata, so there might be ways to reuse (or just extend) the code that does this.