They get their name on the linktree, on the board index and their badge is altered on the fly.
Which I don't like, BTW... On wedge.org/new, we no longer have our Developer badges, because we're moderators. It sucks.
They're also, silently, added to group 3 when in that board, which means you can do permissions checking in that respect.
What permission checking? You mean do in_array(3, $user_info['groups'])?
Don't they automatically get all post/topic-related permissions, more simply?
Again that's the historical aspect. It was never supposed to be entirely based on the permission but showing you the area if you could do at least one thing there - much as you get access to the admin tab if you can do any of the admin like features (e.g. news, manage permissions, manage membergroups etc.)
Sure, but the admin area (which was never just only about administrators) isn't like the mod center, which was designed specifically to allow people to deal with whatever sub-par permissions they had, without giving them access to the admin panel.
And the ONLY place it's used (although it's repeated a couple of times), is whether the user can see the Warning button on a userbox...
That smells like "REMOVE!" to me...
DOOOO EEEET. Basically, yeah, it was a historical thing that was never quite realised the way it was intended.
As for the warning button...
Heck.
allowedTo('issue_warning').
This must be some kind of a joke... I mean, moderators get the 'right' to see the Warning button, but then if they try to click it (from what I gather), they'll get kicked out because area=issuewarning only checks for issue_warning perms to be set...
And AFAIK, this kind of permission isn't given automatically to moderators.
Which is virtually how 1.1.x did it, except it still created proper per-board permissions rather than having discrete profiles.
Yeah, and it's just simpler in appearance, but still the same under the hood...
I wasn't very clear on that point. I knew of the mod cache subsystem, but I wasn't aware of all the details and precisely what it covered - namely the ap element.
Makes more sense to me, coming from you...
:PBut combine the places it is used, with the knowledge of what it actually contains and it becomes rather clear (to me at least) what it was intended for. It's like having 3/4 of the pieces of the puzzle and then suddenly you find that last piece and it all suddenly makes sense.
So, what about it then...? Shall we use it in query_see_topic?
Tell you what. How about you look into it a bit? Now that my work is committed, you may want to simply deal with it by yourself, because nobody will deny you the fact that you're one of the most knowledgeable SMF/Wedge devs when it comes to permissions. And optimization.
Oh, it's horribly confusing, which is why I didn't even implement it in SimpleDesk but left it simply as the ability to copy a role, rather than to mirror it.
Mirroring is still a great thing. I mean, it allows you to give someone a different membergroup name, even if it's the same group in the end.
So, do you think we should rename..?
The other thing with the mirrored permissions is that most mods for SMF never used them properly - not even SimpleDesk got it right, and I don't believe Aeva did either.
Probably yeah. Although Shitiz did most of the coding on permissions...
:niark:(Case in point, I reordered all the groups on my one site to have a bunch of groups, one per user, for unique badges/titles because I'm like that. Each of these new groups was based on a higher group that controlled permissions - but neither SD nor Aeva responds to the child groups properly and I had to end up assigning the permissions in both to all the groups, not just the parent group.)
Oh... Bad Aeva, bad
:-/Dragooon, are you reading this?
I like the idea but I'm concerned it would potentially lead to greater complexity.
Complexity internally? I don't think so. In the UI? Definitely. But it can also be 'fixed', like I said... By only giving membergroups and contact lists that are available to the user. For instance, if a forum has dozens of special groups but all default members are in the default group, then they won't see the option at all -- Wedge can easily remove the 'groups' choice because it's either Members or Guests for them...
I'm also not sure you can actually optimise it *that* far, though, and there's a lot of places that use ?topic in the URL to handle permission loading.
I'm not sure what this implies.
Storing it in the topics table is going to hurt. Storing it outside the topics table is going to hurt too, just in a different way, and neither is lightly ignored.
Ah, I thought it might be the case...
Putting it in the table as a textual id with a list of groups means the query becomes WHERE t.privacy = something OR (t.privacy = 'groups' AND FIND_IN_SET(...)) which is expensive enough.
No find_in_set, because I could see that, in order to keep it simple, we could instead allow only one group for privacy... Although I could imagine people wanting to send to multiple contact lists, which sort of defeats the concept of having a select box for privacy... Argh. (Well, maybe that'd be a good opportunity to implement checkboxes in our dropdowns...
:lol:)
When it comes to contact lists, would be a sub-select. (Pretty much like what UltimateProfile does...)
Meanwhile, putting it in a separate table means either a subquery, or a join, both of which being applied to potentially every topic in a board (or worse) to validate access is going to get very unfriendly very quickly.
Fun...
Now, of course, this performance issue would only happen for members (guests and admins are easily discarded), and only for topics/thoughts where a non-default choice is set... (And when it comes to topics, it's always fast enough to scan that table innit?)
I don't think you're crazy, but I also don't think there's a good way to achieve this meaningfully for topics.
SMF team already complained enough about the performance killer that is m.approved... Heck, it's just a simple flag...!
Regarding applying it to thoughts, I'd actually be inclined to handle that in permissions (permission to post, permission to read, permission to read replies, permission to reply, etc.)
I don't see how/why...
Oh, another possibility...
topic has privacy set to contact list = 42.
user is in contact lists 41 and 42.
user wants to view. Test is done on "privacy=contacts_41 OR privacy=contacts_42". Well, obviously that would make a VERY long query if user was in thousands of contact lists, but then we're pretty sure it's only ONE field that's indexed... Even if it's a string field by now.
:^^;: