[FOLIO-649] User-specific preferences in mod-config Created: 05/Jun/17  Updated: 12/Nov/18  Resolved: 29/Jun/17

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: New Feature Priority: P3
Reporter: Mike Taylor Assignee: shale99
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Blocks
blocks STRIPES-470 User-specific preferences in Stripes Closed
blocks FOLIO-3538 User-specific preferences Draft
Relates
relates to STRIPES-380 Implement preferred-plugin selection ... Closed
relates to STCOR-2 Hotkeys Closed
Sprint:

 Description   

Is there a way to express in mod-config that a particular preference is specific to a user, rather than global to the tenant? For example, in STRIPES-380 Closed (Implement preferred-plugin selection for Stripes) we would like to allow a user to override the tenant-wide choice of an arrow-keys-based text editor for a vi-like one,

If there is already a way to express this, please enlighten me; if not, can it be added?



 Comments   
Comment by shale99 [ 06/Jun/17 ]

hi Mike Taylor
i will admit, the config module was intended less for that purpose and more for module - tenant configs
i was thinking back then that this info would probably live in mod-users
to add this to mod-config - i would probably create another user-config table behind the scenes in any case.

in short , yes, it can be added

Comment by Mike Taylor [ 06/Jun/17 ]

I would prefer to have it in mod-configuration, so I only need to look in one place for all relevant records (the tenant one and the user-specific override if any).

Simplest for me would be just adding a single additional field to the existing mod-configuation schema, userName, which may be undefined (for a tenant-wide config) or set to the name of a valid user. (Or, equivalently, userId – both are unique keys, and it makes little difference to me which we use.)

Then I can just search for (say)
http://localhost:9130/configurations/entries?query=(module=PLUGINS and config_name=markdown-editor)
and I'll get back both the user-specific and tenant-wide records.

... or to avoid getting other users' information back as well, I guess I will be able to optimise with
http://localhost:9130/configurations/entries?query=(module=PLUGINS and config_name=markdown-editor and userName=(mike or ''))

Comment by Mike Taylor [ 19/Jun/17 ]

shale99, I'd like to raise this one up to P2. It's not urgent, exactly, but a lot of things are sorta kinda depending on it, and we'll be able to think more clearly about some aspects of the user experience when we have it.

Comment by shale99 [ 19/Jun/17 ]

ok,
i have two things on my plate to finish and then i can look at this

Comment by Mike Taylor [ 19/Jun/17 ]

Excellent, thanks!

Comment by shale99 [ 27/Jun/17 ]

two comments
1. i want to take this opportunity to align with the naming convention and switch to camel case. how much work will this mean on your end?
2. if a userId is not passed in, i will return only the module level entry

Comment by Mike Taylor [ 27/Jun/17 ]

Thanks.

On #1, go ahead – just (obviously) make it a new major version, so we can't accidentally upgrade to it and have everything stop working.

On #2, that sounds fine.

Comment by shale99 [ 29/Jun/17 ]

waiting for a jira project for configuration and then will release v1 and close and associate with a version - currently 1.0.0-SNAPSHOT in master has this fix
on #2 - i am putting this off for now as it requires query parsing - can be opened as a separate issue if needed

Comment by Mike Taylor [ 29/Jun/17 ]

Sounds good! I assume you have John/Cate/Jakub on making the Jira project?

#2 can wait – it's easy enough to filter candidate records on the client side.

Comment by shale99 [ 29/Jun/17 ]

yea, made a request to john - hope to have that today

Comment by shale99 [ 29/Jun/17 ]

mod-configuration v1.0.0 released
Note that there is now a config project - MODCONF

Comment by Mike Taylor [ 31/Aug/17 ]

Why was this closed? Does mod-configuration now have the ability to store user-specific configs? If so, how do I do that? Thanks!

Comment by shale99 [ 31/Aug/17 ]

there is a userId field in the json schema - you can use that to place the user id for specific configurations

Comment by Mike Taylor [ 31/Aug/17 ]

Excellent, thank you!

Generated at Thu Feb 08 23:07:20 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.