Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hugo Nominations/Voting won't work on multiple memberships accounts. #9

Open
arkoebel opened this issue Jan 4, 2019 · 4 comments
Open

Comments

@arkoebel
Copy link
Contributor

arkoebel commented Jan 4, 2019

The hugo flags used to be in the people table but they have been moved to the membership_types table and the corresponding APIs reflect that.

On the client side, both APIs (user and config) are called, and usually the system recognises the hugo flags and displays the hugo actions as needed. However when an account has multiple memberships, this doesn't work anymore. The hugo flags aren't recognised and no hugo action is displayed (true for all memberships displayed, not just one). Thus someone with multiple memberships can't nominate or vote.

We detected this on the Dublin branch, but this is present on the maailma/master branch as well.

We're trying to see what's wrong on the Dublin side, but any help would be appreciated.

@arkoebel
Copy link
Contributor Author

arkoebel commented Jan 4, 2019

We located the issue around this statement in member-actions.jsx:
if (!getMemberAttr(member)[attrName]) return null
return people.size > 1 &&
people.some(p => p !== member && getMemberAttr(p)[attrName]) ? null : (
return (
<Action ...

It does seem like lines 2 and 3 basically are trying to do the same thing as line 1 (since we're at the member level already).

Any reason why this particular code fragment is there?

@djm4
Copy link
Contributor

djm4 commented Jan 4, 2019 via email

@eemeli
Copy link
Member

eemeli commented Jan 4, 2019

Please verify with your Hugo admin regarding the logic that you'd like to implement for this.

The previous implementation was wholly intentional in hiding Hugo nomination and voting links from the UI when logged in with accounts with more than one nominator or voter. For those users, effectively a direct link was required to nominate; this was included in the emails that were sent to them.

The corner case that's being solved here is that it should at least be difficult to access the nominations or votes of another member, even if your account has technical access to them.

@djm4
Copy link
Contributor

djm4 commented Jan 4, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants