Skip to content

Users - CRUD #662

Closed
Closed

Description

@misskniss

This is a sub-epic of User Support that represents the initial user support items needed for the Beta Release.

Create:
POST /users
email, username, password, organization_id
returns user

Read:
GET /users
params: offset?: int, limit?: int ,search?: string, after_user?: uuid
returns User[]

GET /users/:userid

Update:
PUT /users/:userid/profile (userid can be me)
body: email, username, name?
returns user

Delete/Suspend:
PUT /users/:userid/suspend
returns User



⚠️ The initial issues filed under this epic may not be the full representation of the work.

  • Feel free to create/modify issues.
  • Please add points and tag new issues with the epic they belong to
  • Please let EM or PM know if there is a reason something should NOT be in this milestone/epic IF it changes the intent of the Community MVP delivery items in the Scoping doc so we can adjust accordingly or discuss

Activity

  1. added this to the V2 Beta milestone on Mar 30, 2022
  2. misskniss commented on Apr 1, 2022

    @misskniss
    Author

    @presleyp Thank you for pointing these!

  3. Emyrk commented on Apr 22, 2022

    @Emyrk
    Member

    @presleyp @BrunoQuaresma @kylecarbs in v1 when we delete users, it has an impact on things like the audit log. The audit log references by user uuid, but when deleted, you lose all that info.

    I think we should suspend accounts instead. See https://docs.github.com/en/enterprise-server@3.1/admin/user-management/managing-users-in-your-enterprise/suspending-and-unsuspending-users

    So instead of deleting an account, an admin can suspend an account. This will prevent the user from doing any action on the site until they are unsuspended. When an account is suspended, we treat it like deleted from all UI. I imagine we can have a section to see "All suspended accounts".

    Thoughts?

  4. kylecarbs commented on Apr 22, 2022

    @kylecarbs
    Member

    Right now we have a deleted column on workspaces, and we could do the same for users.

    Suspend makes more sense for users, because you'd never want to allow another user with that email.

  5. presleyp commented on Apr 22, 2022

    @presleyp
    Contributor

    Sounds good to me! Just let me know if I need to get the list of users any differently to make sure I'm not getting the suspended ones, and how to suspend a user.

  6. BrunoQuaresma commented on Apr 22, 2022

    @BrunoQuaresma
    Contributor

    Makes sense to have a suspend endpoint and not a delete one. I will make this endpoint and I will let you know. Do you think we should include a "suspended users" view on community, beta, or enterprise?

    Adding @tjcran to this conversation since it changes the product a bit.

  7. Emyrk commented on Apr 23, 2022

    @Emyrk
    Member

    Right now we have a deleted column on workspaces, and we could do the same for users.

    Suspend makes more sense for users, because you'd never want to allow another user with that email.

    The soft delete for other resources made me consider this. But for users you cannot reuse the email, so it makes sense to allow the user to "log in", but it'll say they are suspended. Soft delete feels like we hide the data, where suspension feels like a behavior.

    If that makes sense.

    @BrunoQuaresma Good tag on Tyler. Good question, we could just keep it in the users view for mvp?

  8. BrunoQuaresma commented on Apr 23, 2022

    @BrunoQuaresma
    Contributor

    @Emyrk do you mean, show active and inactive users as well and maybe have an "active" column?

  9. Emyrk commented on Apr 24, 2022

    @Emyrk
    Member

    @BrunoQuaresma that is what I was thinking yes. Ideally there is a "suspended" page, but probably better to keep the number of pages to a minimum for mvp?

  10. BrunoQuaresma commented on Apr 25, 2022

    @BrunoQuaresma
    Contributor

    @presleyp instead of DELETE a user, we want to "suspend" it. I updated the description to reflect it. Here is the related PR: #1154

  11. presleyp commented on Apr 25, 2022

    @presleyp
    Contributor

    @BrunoQuaresma thanks! Will the endpoint to get all users only return un-suspended users? Or will we need to use a query parameter to specify that?

  12. BrunoQuaresma commented on Apr 25, 2022

    @BrunoQuaresma
    Contributor

    Good question, right now it will return all the users. I see two options:

    • Add a column "status" on the table to show if the user is active or suspended
    • Only return the not suspended users

    What do you think is best?

  13. presleyp commented on Apr 26, 2022

    @presleyp
    Contributor

    @BrunoQuaresma If the backend changed to just return active users, the frontend wouldn't need to change, so unless we need a way to query suspended or all users now, I would just do that.

  14. misskniss commented on May 6, 2022

    @misskniss
    Author

    @BrunoQuaresma I am reopening this because of the open issues still attached. FYI

  15. changed the title [-]User support - CRUD[/-] [+]Users - CRUD[/+] on May 6, 2022
  16. BrunoQuaresma commented on May 6, 2022

    @BrunoQuaresma
    Contributor

    @misskniss Ahh I see, I don't think they are CRUD, but I got it.

  17. removed this from the V2 Beta milestone on May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions