Skip to content

Users who have not yet been approved cannot be deleted #165

@fsando

Description

@fsando

When a user applies for access they are created as user and a token is stored in a special table until they are approved.

As long as the token is in this table (i.e. as long as the user is not yet approved) they cannot be deleted from the user table, apparently because of foreign key constraint.

I believe this can be corrected by changing the foreign key constraint to ON DELETE CASCADE on the token table.

Actions to replicate:
Apply for access on the front page of dbnp by clicking the signup button and fill in the form.
After this, log in as admin and try to delete this user WITHOUT approving them.

Expected behavior:
The user should be deleted.

Actual behavior:
The user is not deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions