Coder Social home page Coder Social logo

Comments (5)

rantahar avatar rantahar commented on August 20, 2024

I'm working on this at the moment. I'm adding an 'invite user' form to the project detail view.

The idea then is that the user can accept or decline the invitation in the memberships view. I'm adding a boolean field called 'initiated_by_user' to CustomUser to facilitate this.

Any comments?

from cogs3.

tystakartografen avatar tystakartografen commented on August 20, 2024

Ideally, the CustomUser model should only contain the necessary fields to represent a user. I would recommend putting any fields related to a project membership invite, either in the project membership model or even create a project membership invite model. How would the initiated_by_user be used?

from cogs3.

rantahar avatar rantahar commented on August 20, 2024

I'm sorry, I meant the ProjectUserMembership, not CustomUser.

The memberships view would allow the user to accept the membership if Initiated_by_user is false and similarly the requests view would allow the tech lead to accept if initiated_by_user is true. The permissions to edit the membership status would similarly depend on the field.

The user/tech_lead could of course decline the invitation/request as well. Once the invitation/request is accepted, the only the tech lead could revoke or suspend.

from cogs3.

tystakartografen avatar tystakartografen commented on August 20, 2024

Sounds good to me 👍 . It's probably worth adding a help text entry to the field to clarify it's purpose.

from cogs3.

rantahar avatar rantahar commented on August 20, 2024

Added pull request #46 that implements inviting members.

Note that there is a weird bug that causes the integration test to fail in my setup. Updating the membership status does not work in the memberships view. The bug only applies to the integration test.

Currently the tech lead can only add existing users. We should probably add a way to instantiate users with institutional addresses automatically when invited to a project.

from cogs3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.