Coder Social home page Coder Social logo

Comments (5)

cielf avatar cielf commented on September 26, 2024

Ok --- that actually makes sense -- if the resource is the invitee! On Sunday, we were talking about it as if the resource was the inviter.

So what's happening is that when we set up a partner, there is a primary user email. At some point (maybe not until we invite) we create a user for that person, and point to it as the primary user.

That user is going to get the "You've been invited to be a partner..." message.

But subsequent people who are added to that partner are going to get the message that says they've been invited to the partner's account.

And to return to the prompting question (can we change all to has_active_role?) -- Hmmmm... is there anyway that we could get to this code without them having an active role? I doubt it. I expect that when they are invited, their role gets added, and that if they already have a role on the partner, even a deactivated one, they can't be added -- but we should check that manually.

from human-essentials.

cielf avatar cielf commented on September 26, 2024

Oh, and to further answer some of the questions. Yes, partners can invite people to have the partner role on that partner.

from human-essentials.

cielf avatar cielf commented on September 26, 2024

@elasticspoon Is this all moot if we are going with the simpler architecture as discussed (i.e. can this be closed, in your opinion?)

from human-essentials.

elasticspoon avatar elasticspoon commented on September 26, 2024

I totally forgot about this. I think it makes sense to close this if we open a related issue to change the mailer.

That is to say. I won't need to change this because of the role thing. But I do think that the logic is incorrect in the mailer. Feel free to correct me if you think otherwise.

I think we should be checking that a user has the partner role with a specific resource, not just a partner role in general to make that invite.

from human-essentials.

cielf avatar cielf commented on September 26, 2024

@elasticpoon If the resource is the invitee, rather than the inviter, the logic makes good sense.

We send a different message to the primary partner id -- because they're the first, than we do to subsequent users for the partner.

I can think of a weird edge case (someone that is a partner, then gets invited to a bank) that might go awry. But I'm not sure if this code even gets executed if they're already a user. So I'd have to test it out.

I admit, I'm not 100% exactly what "resource" is in this case -- so I may need to dig more.

from human-essentials.

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.