Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify the behaviour of createValues and defaultValues #217

Open
davidcoutadeur opened this issue Jun 6, 2023 · 1 comment
Open

Modify the behaviour of createValues and defaultValues #217

davidcoutadeur opened this issue Jun 6, 2023 · 1 comment
Milestone

Comments

@davidcoutadeur
Copy link
Contributor

This is a major change, and should be tagged for version 2.2.

Currently, the behaviour is:

<createValues/> 	
If: 
* no <forceValues/> are specified, 
* no values are read from the source, and
* a new entry is being added, 
THEN the attribute will be created with values from <createValues/> 

<defaultValues/>
If: 
* no <forceValues/> are specified, 
* no values are read from the source, and 
* the attribute doesn't yet exist in the destination, 
THEN it is created in an existing entry with values from <defaultValues/>

Here is a problematic use case:

  • set up a createValues with a fixed userPassword string
  • build another attribute, for example hashedPassword = sha(userPassword). This implies to define userPassword as source fetched attribute.

The fixed userPassword string won't be taken in consideration because userPassword has been declared as a source attribute.

I propose to remove the condition: no values are read from the source.

To obtain the same behaviour, admins can simply use javascript to test the presence of the source attribute:

srcBean.getDatasetFirstValueById("userPassword");
@davidcoutadeur
Copy link
Contributor Author

See also #216

@coudot coudot modified the milestones: 2.2, Future Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants