-
Notifications
You must be signed in to change notification settings - Fork 1
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
Comments
We located the issue around this statement in member-actions.jsx: 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? |
On 4 Jan 2019, at 12:54, arkoebel ***@***.***> wrote:
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?
Update: I think we’ve got it:
if (!getMemberAttr(member)[attrName]) return null
return people.size > 1 &&
!(people.some(p => p === member && getMemberAttr(p)[attrName])) ? null : (
return (
<Action …
Basically, a couple of tests in the logic were the wrong way round
I’m still not sure that the test is necessary, but I think it now works in the way it was intended.
…--
David Matthewman
|
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. |
On 4 Jan 2019, at 21:21, Eemeli Aro ***@***.***> wrote:
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.
*lightbulb!*
Ah yes, that makes sense. Thanks!
We will definitely discuss with our Hugo Admin; I think he may currently be taking a different view, but I do see the sense of that approach.
…--
David Matthewman
|
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.
The text was updated successfully, but these errors were encountered: