Proposal: Membership System 2.1

A little digging shows that setting the user title automatically per group doesn’t really work when you’ve got multiple groups fighting for “Primary” status. For example, my title reads Director, but click it and you get the Members group.

Therefore, I suggest adding an extra bit of code in MS2.1 that sets “Primary Group” with a definable hierarchy of primacy (eg. Director > Keyholder > Member)

The relevant API call should go like:

PUT d= primary_group_id=[group_id] https://discourse.southlondonmakerspace.org/admin/users/[user_id]/primary_group.json

(untested. it might accept username as well as id)

The system actually already did this but Tom has been tinkering and changed things… I would suggest we make it explicitly say Keyholder rather than Member :key: or Member (keyholder)… You have to be a member to be a keyholder…

Does that actually fix the issue?

Well the system was supposed to do this, but nobody actually got given the "Member :key: " title cos of the clash of Primary Groups.

I think to fully fix it, ie. have the correct title, and have it link to the correct group, you’d have to drive Primary Group and User Title with the API.

Further thought: we should probably only advertise who are keyholders to people logged in as members.

Hmm, interesting, I hadn’t considered this as a thing, but makes some sense.

I don’t think that’s possible

Thats not possible, and most members become Keyholders so it’s not a big deal.

Have done some more work tonight:

  • Got the code loading sub apps and the navbar sorted, this is substantially faster now, not that it matters, no will notice as it only loads apps once when the server starts.

  • Navbar updated to use dropdowns, this is probably most useful for administrators because there is no need to first click admin then members/permissions/transactions, you can just go direct to the app.

  • Rejigged the setup screen into it’s own app and put up a nag banner that won’t go away unless you setup your account properly.

  • An avatar link is also included, that directs users where to update their photo on Gravatar.com

2 Likes

More good work!

1 Like

I’ve added a basic event feature as a starting point, for now it only logs actions to the API but I might add support for displaying other stuff like the door/shutter being open closed, and temperature logging, the code is there for that it just needs an API and someone to make the things in the space do that.

I also thought about adding a way of claiming a tag, but I’ve not got that far… this is just a basic log for now, not even paginated.

1 Like

Discourse should pick up the gravatar and use it in place of the coloured letters, too.

It does, but it’s not automatic, you have to select it and also use the reload icon if it is cached already…

I’ve written a script that runs once an hour (less frequently than permissions) to update the primary group of everyone.

It prioritises permissions in the database 1, 2, 3… and assigns the first permission they actually have as the primary group for the user, it doesn’t do this for users without any active permissions that haven’t got a order value, so in other words, if you aren’t a member, keyholder or director this won’t change and it doesn’t clear incorrect values for unlinked users.

Basically it should work, but it’s not, because Discourse still isn’t updating the user title.

I am giving up on this, I’ve gone well beyond what I should have to do in order to get Discourse to behave correctly, this is a bug.

  • I’ve tried just setting the correct primary group.

  • Clearing the title and setting the group.

  • Clearing the group and setting the group again.

None of this works, and even using the UI it is next to impossible to get it to work properly, might be easier to just set the title in the membership system, but their code is the problem.

I’ve done a last few tweaks for this burst of energy:

  • Made the mandate and subscription links in the admin area direct link into GoCardless so you can get more information.

  • Displays the permission you are filtering by in the member app.

  • Reduced how often it checks primary group to 6 hours, as this doesn’t work how we want and it is pretty hard on discourse.

  • Ordered all member lists in admin and public by last name, first name.

Also, the event app now has some real data because people have been using the door:

4 Likes

Superb work as always :slight_smile:

1 Like

A few updates, trying to make the Events app a bit more user friendly, especially as we end up with more events, it now shows only one month at a time…

Desktop:

Mobile:

1 Like

Could we have the Filter By Permissions dropdown in the Admin members list too please? Thank you :slight_smile:

Admin > Permissions > (select the permission)

1 Like