Cannot filter on System.User attributes

0
We are importing our users via LDAP. When a user leaves the company the LDAP importer sets the attribute Active to false. The Sysem.User record is not deleted from the database. This is all perfect. The application contains multiple dropdown fields where a user is allowed to pick a user. I need to filter the dropdown with [Active = true()]. However normal business users do not have access to the Active attribute As a result the dropdown becomes an empty list What is the recommended way ? @Mendix: why is the Active attribute hidden (same holds for Blocked attribute)  
asked
2 answers
0

Hi Wim,

The recommended way is to split process from your account handling.

As I understand a user can select another user in a page, part of the business proces covered in the app. Right?

The System.User entity should only be used for account handling and logging in to the application. Comparable to your passport. You will only use the passport on specific moments when you have to authenticate yourself. i.e. at the airport. you won’t show your passport details to anyone on all occasions when someone asks your name.

The same counts for the account of a user and the details used of that user in the proces.

The data used in the application process should be captured in a separated entity which has a 1-1 association to the Account entity. This “proces” entity could contain the active boolean you need. I know the active boolean in the user entity disallows login, which 

  1. should be handled in the account handler
  2. when separating login and proces data, its easy to delete or create an account for the proces data object and link it. Thus, instead of active = false, the account can be deleted completely

 

See this academy lecture for domain model setup and how an account can be created for a employee/proces entity.

https://academy.mendix.com/link/module/325/lecture/2498/8.7.1-Creating-Accounts

Note that in your case the account goes before the employee data and thus the creation proces is the opposite account → Employee instead of Employee → Account

answered
0

Hi Rene,

 

Thanks for this clear answer.

My Business User entity is a specialization of the Mendix Account entity (that is a specialization of a User entity).

But perhaps I should follow the suggestion and remodel my entity to have a one-to-one association in stead of a specialization.

 

 

Wim

answered