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

No error message when trying to create a FO administrator, who is already a FO user. #524

Open
PBD-ILR-LU opened this issue Dec 18, 2023 · 1 comment

Comments

@PBD-ILR-LU
Copy link

A Monarc FO instance administrator left his company.
He had to be replaced using the BO. The new e-mail address has been configured.
The issue was that this new e-mail address is the one of a person already defined as user of the FO.
So whereas no change has been done on FO side, the BO has not displayed any error message.
It would be important that an error message would be displayed.

@ruslanbaidan
Copy link
Contributor

Workflow challenges

Any company's or the 1st superadmin user's changes on the BO side are applied by the ansible script that is executed in background mode. Ansible performs a connection to the client's DB and executes the records' modifications, inserts new ones or deletes in case of cleints' models changes.
Therefore an error message can't be displayed instantly and ansible has no mechanism to push a notification to the BO side.
Also when ansible executes a list of of SQL queries generated by the BO and it doesn't know if the result was successful, as it is a batch of them.

Actual situation

When there is an attempt to update an existing 1st superadmin user data to an existing on FO user, the SQL query fails due to the email address duplication on update.

Solutions

  1. Semi-automatic way.
    If the user's account is already presented on the FO side, then contact him/her to delete his account first. It is possible to do it via My account -> Danger zone -> Delete my account. And replace the 1st superadmin to the removed one.
    Currently working solution.

  2. Develop and API to obtain a list of users from a particular FO instance and call before opening the client's change dialog. If the existing user is selected as a new 1st superadmin account, then the only ID can be replaced by ansible. However also some other linked information. This endpoint can only be accessed by the BO instance. After the change is done the new 1st superadmin has to drop the old superadmin account (if the person left the company).
    There are no external APIs available on the FO side and it requires a new complex dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants