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

Creating a technical user should require a subject #2208

Closed
ghost opened this issue Jan 9, 2020 · 3 comments
Closed

Creating a technical user should require a subject #2208

ghost opened this issue Jan 9, 2020 · 3 comments
Milestone

Comments

@ghost
Copy link

ghost commented Jan 9, 2020

This is a direct continuation of the work for #2088, which has been merged to development in the meantime.
After discussing today with @erlemantos , I realized the persistence of a string representing the subject should actually take place when creating a technical user.
The only logical point where an administrator creates a technical user is when they are adding a (new) user to a namespace.
Therefore, the modal I created in #2088 needs to be completed with a required text field stating the "subject".
That field will require validation both on the front-end and back-end - will need to figure out what exactly constitutes a valid string representing a subject.
Persisting the additional field should be trivial as the table design already has it and it'll just be about writing trivial logic at controller / back-end level.

@ghost ghost changed the title Creating a technical user does not require a subject Creating a technical user should require a subject Jan 9, 2020
ghost pushed a commit to bosch-io/vorto that referenced this issue Jan 9, 2020
* modal for technical user creation now also prompts for subject (required, pattern-validated)
* DTO, controller and back-end now validate, handle and persist the subject
* few changes in adding user to tenant, e.g. button disabled until some username typed (previous implementation was not working and loading animations are still useless pretty much all over the place still now)
* added some failsafes when handling search vs actual usernames in form

Signed-off-by: Menahem Julien Raccah Lisei <menahemjulien.raccahlisei@bosch-si.com>
ghost pushed a commit to bosch-io/vorto that referenced this issue Jan 9, 2020
* Created a few tests for tech user creation regarding subject

Signed-off-by: Menahem Julien Raccah Lisei <menahemjulien.raccahlisei@bosch-si.com>
@ghost
Copy link
Author

ghost commented Jan 9, 2020

PR here.

@ghost
Copy link
Author

ghost commented Jan 10, 2020

Note on subject validation: at the moment I'm just using a 4+ alnum rule.
This can be fine-tuned relatively easily in the future, although it has to be done in both front-end and back-end.

@kolotu kolotu assigned ghost Jan 14, 2020
@kolotu kolotu added this to the 0.13 milestone Jan 14, 2020
@ghost
Copy link
Author

ghost commented Jan 14, 2020

#2209 merged. Closing.

@ghost ghost closed this as completed Jan 14, 2020
JulianFeinauer pushed a commit to JulianFeinauer/vorto that referenced this issue Jun 27, 2020
* modal for technical user creation now also prompts for subject (required, pattern-validated)
* DTO, controller and back-end now validate, handle and persist the subject
* few changes in adding user to tenant, e.g. button disabled until some username typed (previous implementation was not working and loading animations are still useless pretty much all over the place still now)
* added some failsafes when handling search vs actual usernames in form

Signed-off-by: Menahem Julien Raccah Lisei <menahemjulien.raccahlisei@bosch-si.com>
JulianFeinauer pushed a commit to JulianFeinauer/vorto that referenced this issue Jun 27, 2020
* Created a few tests for tech user creation regarding subject

Signed-off-by: Menahem Julien Raccah Lisei <menahemjulien.raccahlisei@bosch-si.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant