NethServer / dev

NethServer issue tracker
https://github.com/NethServer/dev/issues
62 stars 20 forks source link

Enforce the domain validation when an application bind to the user domain #6860

Closed stephdl closed 7 months ago

stephdl commented 7 months ago

Proposed solution

The code is working well but we do not verify that the user account domain exists before to bind to it, we must have a stronger behaviour and verify before to bind if the user-account exists

Alternative solutions

let the code as is

Additional context

core 2.5.2

stephdl commented 7 months ago

QA

DavidePrincipi commented 7 months ago

@stephdl sorry for coming late at the party, but the error returned by the action should conform to other validation errors, e.g.

if realm in domains and provision == 'new-domain':
    agent.set_status('validation-failed')
    json.dump([{'field':'realm', 'parameter':'realm','value': realm, 'error':'domain_already_exists'}], fp=sys.stdout)
    sys.exit(2)
DavidePrincipi commented 7 months ago

In core 2.5.3-dev.5

DavidePrincipi commented 7 months ago

VERIFIED

DavidePrincipi commented 7 months ago

Released in