oasp / oasp4js

OASP4JS deprecated repository
Apache License 2.0
9 stars 161 forks source link

User profile concept #5

Open mmatczak opened 9 years ago

mmatczak commented 9 years ago

We need to come up with a concept what user related data (or application related data being more general) should be kept in the client. Example pieces of such data are: 1) user name, date / time format, language 2) dialogs the user is authorized for 3) user's menu structure

Needed are the following steps: 1) Server-Side (Java): Implement a transformer which based on the current user information creates a data structure holding the data needed in the client. The data structure is returned by the SecurityRestServiceImpl.getCurrentUser() REST service.

2) Client-Side (JavaScript): update the appContext service accordingly

hohwille commented 9 years ago

1) We already have user name (first and last name). Already provided by the service. For data/time and language my question is: Would it not be sufficient in our sample app to use the HTTP and browser standard for this? You can determine the locale of the current user. To switch locale you then have to change it globally in your OS. This might be undesired but I consider this as a rather advanced use-case. With lower priority we can implement this so the defaults apply but the user has the chance to override via his profile.

2) In our sample we have a simple role base concept. This is IMHO totally sufficient here. The role already contains all information required. Find an arbitrary way to figure out what you need to know based on the role of the user within jsclient.

3) I disagree on this. We should keep the sample application simple. Personalized menu structures are a very special use-case. Do not lead our projects to overcomplicated solutions.

hohwille commented 9 years ago

FYI: For 1) users can also use a browser plugin https://addons.mozilla.org/de/firefox/addon/quick-locale-switcher/

mmatczak commented 9 years ago

OK, so let keep it simple. We need a simple authorization component which would map the roles (obtained from the server) to dialogs. The component can then be used to:

  1. render a menu
  2. checking if a given dialog is to be shown or not (just examples, not a complete list).