This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
4816
Plugins / Re: Edit History
« on February 23rd, 2012, 11:02 AM »
Yeah, don't worry too much about the code stuff, that was more a passing comment for anyone who is interested in extending that menu in a specific way ;)
I did start, briefly, on making it able to show two edits side by side and show the changes, but I got sidetracked with personal stuff and haven't gotten that far with it. (Sadly, MediaWiki has a rather nice piece of code derived from GNU diff, but it's GPL and thus not suitable licence-wise)
I did start, briefly, on making it able to show two edits side by side and show the changes, but I got sidetracked with personal stuff and haven't gotten that far with it. (Sadly, MediaWiki has a rather nice piece of code derived from GNU diff, but it's GPL and thus not suitable licence-wise)
4817
Features / Re: Privacy options
« on February 23rd, 2012, 10:50 AM »I still don't like it. I don't like that you're forced to wear a Moderator badge when you should have the Developer or Boss badge. Teaches people some respect
Are you sure really...? I tried looking for 'issue_warning' for instance, and neither Load.php or Subs.php have it. Only ManagePermissions.php which seems to do some voodoo about it, but what does it mean? That once you're set as a board moderator, these permissions are assigned to you automatically, hard-wired style, visible in the database and all? And that these permissions are removed when your status is removed?
So yes, it's a bug - they have the power to see the warn button but not to actually use it.
Confusing, really... More confusing than the allowedTo().
Can you share your opinion on this? It's untested...
After all, it's not like adding query_see_topic will break anything. It can be done gradually
I wouldn't be able to determine what's best, between "mirror from profile..", "mirror profile", "alias of profile..." or whatever makes sense.
Hmm, well... As long as it works...
I'm afraid I still don't get it. But don't bother...
But, for some reason that escapes me, I ended up removing the feature (possibly because it was seen as too complex?), so here are are.
I just said that if we have to store an extra integer for the contact list ID, then we might as well enable Wedge to store a group ID in that same place...
Let's just say that UP has three good things
I see... I imagined that varchar fields only made the index bigger, not slower, than an integer field.
Here's the deal: if all the rows are fixed length (numeric, or specifically char fields), the table is faster - because it can use the index to identify a row and get there very quickly, as it doesn't have to go row by row to find it, it can just say 'row abc x bytes-per-row' and get to its position. (Since the position is not recorded in the index, or at least it never used to be)
But with variable length fields, it can't pre-calculate the position and has to go through the table to find them. While there are ways to speed that up, it's still not as fast as fixed-width rows.
Text/blob fields are special. As far as fixed/variable width rows are concerned, they're actually fixed, because they only contain a reference within a secondary data area where the content is located. That's how, for example, you transcend certain limits (a row in MyISAM at least can only be 64K in total, and a text field counts two bytes towards that, but only two bytes regardless of its actual length) - and that's not a performance issue in of itself when dealing with tables with text/blob fields.
The problem comes in when you query a table with such records, and actually retrieve the text/blob. In those situations, if you do any ordering, it triggers a filesort rather than an in-memory table.
Hmm. So the same problem awaits us. A vast majority of topics and thoughts are gonna be public, so granularity or whatever will not be to our advantage...
Err, yes? I suppose so...
So it's faster, then? Indexable?
4818
Features / Re: Privacy options
« on February 22nd, 2012, 06:06 PM »Which I don't like, BTW... On wedge.org/new, we no longer have our Developer badges, because we're moderators. It sucks.
What permission checking? You mean do in_array(3, $user_info['groups'])?
Don't they automatically get all post/topic-related permissions, more simply?
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.
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.
Yeah, and it's just simpler in appearance, but still the same under the hood...
Complexity internally? I don't think so. In the UI? Definitely.
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.
Also, I thought you were still working on it at present?
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..?
I'm not sure what this implies.
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...
When it comes to contact lists, would be a sub-select. (Pretty much like what UltimateProfile does...)
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?)
SMF team already complained enough about the performance killer that is m.approved... Heck, it's just a simple flag...!
We'd actually get more benefit from keeping an accurate track of moderated posts in a topic and topics with moderated posts in a board - so if there's nothing that has pending moderation status in that board or topic, don't perform that test.
I don't see how/why...
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.
4819
Features / Re: Privacy options
« on February 22nd, 2012, 04:19 PM »I'm just wondering what board moderators are allowed to do that is, or is not included in the moderate_board permission...
can_mod is "do I have access to the moderation center[1], or am I allowed to moderate at least one membergroup or board, or approve posts to some extend?"
Instead of the other way around... In that respect, I don't know why Load.php has $context['allow_moderation_center'] = $context['user']['can_mod']; at some point when it should be using the permission, directly...
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...
The UI could be better, I think.
For instance - just an idea - one could simply 'hide' them profiles at first. You set up permissions for a board. Then when you create or edit another board, you get the ability to apply another board's permissions. At which point, its permission profile is used. Otherwise, a new permission profile is created for the new board. Only problem is the 'default' name for these profiles.
I love how you are quick to adapt! Earlier today you said you'd never heard about it.
There's another thing with inherited board permissions. We absolutely need to document this in a Help icon or something. Have something right next to the option list, saying what they'll do. I always, ALWAYS get confused between copied permissions and inherited permissions (i.e. nothing is copied, just using the original's on the fly). Perhaps we ought to rename the terminology. "Copy permissions" and "Mirror permissions", maybe...
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. (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.)
We'll probably have to leave it at that for the first versions. There's no time to deal with that, and the SMF importer will get the original permission profiles anyway, so people are likely to have already solved their permission problems already... (It's for new users that it gets annoying.)
leave 'groups' in as a possibility? Can always be removed later...
- add a 'privacy_id' field?
- best solution for performance? What should the extra index(es) look like?
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.
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.
I don't think you're crazy, but I also don't think there's a good way to achieve this meaningfully for topics.
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.)
4820
Features / Re: Privacy options
« on February 22nd, 2012, 02:51 PM »Have you got some thoughts to share on all of this, Pete..?
The #1 issue with all this is that there are too many things to go through if you don't know better.
Have I got...
For the most part, you only need to be bothered with standard permissions checks (allowedTo style) because it's surprisingly infrequently that you worry about board permissions outside of a board context. Even in SimpleDesk where I had the same situation to encounter, even there it actually was not a problem in the same fashion (and there was no such thing as general vs 'board' permissions, everything was implied to be a board permission of sorts)
But in SD's case, I didn't have separate logical structures to contain things - when you loaded permissions, you did so in a single hit, and loaded access to every board's permissions in a single hit, meaning you always knew which departments you had what permissions for.
Am I a moderator on this board?
At this point, it becomes really unclear what 'can_mod' is for, why 'is_mod' is reset in SSI
There's a strong, huge feeling that SMF has been overhauled many times when it comes to permissions, and once again different developers had their own idea of how to make it 'simpler', and failed to make them commonly used.
* profiles
* post approval
* the mod_cache
(The whole simple vs classic thing is purely cosmetic. It's also stupid, but that's a debate for another day.)
The whole profiles thing is interesting. I actually remember an argument I had with Antechinus about that[1] over reverting to 1.1.x local board permissions vs global ones, but honestly that's about as confusing! The reason for the argument was because of an important lack of understanding - there was a *reason* profiles were adopted instead of local/global board permissions, and that was to simplify applying the same permissions to multiple boards at once.[2] It did, incidentally, fix a few bugs in 1.1.x's 'profiles' as they stood, too.
Fortunately for the most part, the profiles mechanism doesn't really make that much difference for us in terms of mechanics, because whatever we do, it will probably use some of the same infrastructure.
Then there's post approval. The whole permission implementation of that had some convenience-for-UI-building factors (and still does, in ways I have not yet solved for moderation filters) but it causes the problem we've been bouncing around here - that you need to have some conceptualisation of board-level permissions being applied to a context outside of boards.
Prior to post approval's introduction, there was never a context in SMF where you'd ever need to understand board level permissions properly in places that have a meta board context - yes, search/unread/unreadreplies/recent had *some* idea of board level permissions, for whether you could reply to a post or edit it or whatever, but all that was doable after the event, as it were - you only had to worry about board *access* to see posts, not a permission attached to whether you could see an individual post.
This brings us to the mod cache - whose sole existence, if I'm any judge, is to mitigate the very performance issues that I'm getting at. Now, here's the thing: the reason it's not used that much in SMF is simply because there are that few places where having board-level permissions outside of a board just doesn't make much difference. Primarily it supports post approval - but the rest are nice convenience features, and that allowedTo() is probably more important.
So, where does that leave us? It leaves us with a permissions system that I've wanted to overhaul for a while - because SMF's permissions system is unintuitive. It's very, very powerful but the price paid is the complexity of actually trying to use it - and almost everyone I know (including me) has misused it and used it incorrectly to do things that shouldn't be done that way.
For example, if you have two or three 'teams' that are all, practically speaking, global moderators but have different badges, the correct thing to do is make new groups for each team that all inherit from a parent group so you manage the permissions centrally - but most don't.
The really sad part is, I don't have an answer yet. I've had bits of answers floating around and my gut instinct is to dump SMF's permissions core and merge in SimpleDesk's in some respects but that's not really where I want to go with this.
What is clear is that SMF's permissions are broken, and a lot of that is down to perception: as I identified when figuring out SD's permissions, a lot of the problems in SMF are really caused by people conflating groups and roles, and building on that incorrect premise. It's almost like we need to separate groups from permissions properly.
| 1. | It was in that conversation I realised how doomed SMF really was. |
| 2. | The point of the argument is that to fix a problem you must understand how the problem came about. Going backwards doesn't mean you go forwards if you don't understand what you're undoing in the process. |
4821
Plugins / Re: Edit History
« on February 22nd, 2012, 01:49 PM »
Thanks :)
Haven't yet decided what I want to do with permissions on it yet, though, and I'm currently trying to decide how thorough to make it handle comparisons between versions and stuff like that but it's coming along nicely enough :)
Haven't yet decided what I want to do with permissions on it yet, though, and I'm currently trying to decide how thorough to make it handle comparisons between versions and stuff like that but it's coming along nicely enough :)
4822
Features / Re: Privacy options
« on February 22nd, 2012, 10:25 AM »
I will look into it, need to go out for a bit first.
4823
Features / Re: Privacy options
« on February 22nd, 2012, 10:04 AM »
Cripes, even I didn't know about that.
4824
Plugins / Re: Edit History
« on February 22nd, 2012, 10:00 AM »So you're not using the user menu then? So. Action menu maybe?Quote from Arantor on February 22nd, 2012, 12:44 AM The history of a post is pretty post centric?
4825
Plugins / Re: Edit History
« on February 22nd, 2012, 03:15 AM »
Anyway, I got quite a bit sidetracked this evening on other matters, but I've got the next stage implemented.
4826
Features / Re: New revs
« on February 22nd, 2012, 02:19 AM »
(1 file, 1KB)
Revision: 1374
Author: arantor
Date: 22 February 2012 01:19:01
Message:
! Forgot to remove some debugging code from Load.php (Load.php)
----
Modified : /trunk/Sources/Load.php
Revision: 1374
Author: arantor
Date: 22 February 2012 01:19:01
Message:
! Forgot to remove some debugging code from Load.php (Load.php)
----
Modified : /trunk/Sources/Load.php
4827
Features / Re: New revs
« on February 22nd, 2012, 02:04 AM »
(2 files, 2KB)
Revision: 1373
Author: arantor
Date: 22 February 2012 01:03:33
Message:
! Board and topic access was entirely broken, due to incorrect testing on the privacy rules where a board has an owner (if a board had no owner, no checking was done for guests - and no boards have owners by default). Phased out the old $board_info['groups'] variable, and updated a function to accept the newer board permissions setup (sans board owner rules for now). ManageBoards still needs updating to work with the newer allow/deny stuff. (Announce.php, Load.php)
----
Modified : /trunk/Sources/Announce.php
Modified : /trunk/Sources/Load.php
Revision: 1373
Author: arantor
Date: 22 February 2012 01:03:33
Message:
! Board and topic access was entirely broken, due to incorrect testing on the privacy rules where a board has an owner (if a board had no owner, no checking was done for guests - and no boards have owners by default). Phased out the old $board_info['groups'] variable, and updated a function to accept the newer board permissions setup (sans board owner rules for now). ManageBoards still needs updating to work with the newer allow/deny stuff. (Announce.php, Load.php)
----
Modified : /trunk/Sources/Announce.php
Modified : /trunk/Sources/Load.php
4828
Plugins / Re: Edit History
« on February 22nd, 2012, 12:44 AM »
The history of a post is pretty post centric?
4829
Features / Re: Privacy options
« on February 22nd, 2012, 12:26 AM »Considering that SSI.php starts with "$user_info['is_mod'] = false;", do you think it'd be safe/okay to replace false with allowedTo('moderate_forum')? It's better than nothing... (Would have to move the stuff to after the loadPermissions() call though, I guess.)
Or... just not bother?
Please tell me if you find anything that's logically wrong.
4830
Plugins / Edit History
« on February 22nd, 2012, 12:22 AM »
Been thinking about this one for a while, and finally started working on it today. So far I've got it able to store the edits as they're made (which is by far the easiest bit of the code) and added an item to the menu to view the edits.
It's also, interestingly, exposing a weakness in the post display, in that there's no way to alter the items (other than those in the menu) by way of a hook - nor is it possible to do what Niko's mod did and have the 'last edited' text be a suitable link. Not yet sure how I want to deal with that.
As far as the menu goes, the real struggle - such as it was a 'struggle', depending on your definition - was making the text be different between menu instances, to include the number.[1]
But here's what I have so far. It's not very exciting, because I haven't gotten onto the real meat of the display yet, but that's OK, I haven't spent that long on it yet.
It's also, interestingly, exposing a weakness in the post display, in that there's no way to alter the items (other than those in the menu) by way of a hook - nor is it possible to do what Niko's mod did and have the 'last edited' text be a suitable link. Not yet sure how I want to deal with that.
As far as the menu goes, the real struggle - such as it was a 'struggle', depending on your definition - was making the text be different between menu instances, to include the number.[1]
But here's what I have so far. It's not very exciting, because I haven't gotten onto the real meat of the display yet, but that's OK, I haven't spent that long on it yet.
| 1. | Nao wrote that code and it is very, very efficient, but doing something like this is atypical - and as a result, a little bit tricky, but nothing that can't be solved relatively easily, all that happens is we create placeholders for each of the counts and use those, e.g. if a post has 1 edit and another has 2 edits, we create dynamic $txt entries to cope with it so they each get a 'unique' identifier. If you're not planning on touching that menu it really doesn't matter to you, other than the fact it works. |