It looks like people outside my game can't view the threads in my game's subforums. They can only see the threads in the main forum (I set the game forums to 'public'). Another game I created a long time back doesn't seem to have this problem, and the access permissions in the Administrative Control Panel are identical for both games
Compare Adventures in Karameikos (https://gamersplane.com/forums/11802) - players not part of the game can't see subforums.
Masks: Coming of Age (https://gamersplane.com/forums/11077/) - players not part of the game can see the subforums.
Here is the permission set for the game that is causing me problems. If you scroll down, it is exactly the same as the Masks game, for which the subforums are visible:
Premissions for the Masks game:
Subforums are not visible for players not part of the game:
subforums ARE visible for players not part of the game:
403 error, so at least it is something to do with access, not just visibility. This is bizarre. :0
I checked a few other recent public games and couldn't find one with a subforum; I wonder if it's a more global issue?
Keleth, vagueGM, would it be useful to know when the problem started time-wise? I can look through public games and see which will be the first where I can see a subforum.
I got what I believe is the problem fixed on staging, assuming I understood the issue correctly. If folks don't mind testing, let me know. Once it's live on prod, I'll run a script to test.
Though I now realize, we don't have a mechanism for making subforms publicly private. I'm thinking I did this on purpose way back when. Instead, should I make a feature were you can set individual subforums as publicly private/public, instead of in sync with the main game forum? I can image there'll be games where folks don't want their subforums to be public, or at least not all of them? Or should toggling do both, and a GM can toggle each one individually? I kind of lean to the last.
You can just set the general permissions for the suforum to deny read access. Shouldn't that make it private?
At the moment, you can't access the general permissions on game forums.
I made an executive decision and instead of having the public/private game toggle change subforum permissions, I added the ability to change the read permissions on game subforums (you can't change the game's root forum general permissions, as that's still controlled by the private/public flag). Anyone interested, please test it out on staging.
If you give people tools they will find a way to use them, but it's a matter of how much effort it is for you. On another platform(RPOL), there are more granular visibility controls and some games use them heavily while others just use a more global approach. One use case is that you want the Lore and Character Creation type threads to be visible to all if you are recruiting new players but otherwise want to keep the roleplay forums private. With the finer granularity people run games where players in the game can't see threads their characters are not in (I wouldn't do that, but it is used.)
I can image there'll be games where folks don't want their subforums to be public, or at least not all of them? Or should toggling do both, and a GM can toggle each one individually? I kind of lean to the last.
I suspect it would depend on what the GM was using the subforums for. I can think of no reason I would want to hide one of my subforums, although I would want to be able to restrict editing and posting privileges of some to myself, and others to my player group.
e.g.
* Campaign Wiki: GM only posting and editing, public viewing.
* The Tavern: Player group posting and editing, public viewing.
* Player Introductions: Player group posting and editing, public viewing.
I can think of no reason I would want to hide one of my subforums
A common use case I have for this is when it's a split party and I don't want the different groups to see what each other is up to.
With mega games (10+ players) sub-forums can be used as "sub-games" to improve the player experience and avoid spamming their inbox with posts from other groups.
I can think of no reason I would want to hide one of my subforums
A common use case I have for this is when it's a split party and I don't want the different groups to see what each other is up to.
With mega games (10+ players) sub-forums can be used as "sub-games" to improve the player experience and avoid spamming their inbox with posts from other groups.
Yes! I can see how that might be useful.
Although I usually just create separate session logs for each group.
So, for example, back in 2021 when my game started, we had six Session 0 threads (one for each character) and then gradually merged them as the characters met and began working together.
... Instead, should I make a feature were you can set individual subforums as publicly private/public, instead of in sync with the main game forum? ...
That does seem like it would be useful. You already have the permission separate, so it is just about adding a UI element in the ACP to change them.
It could just be another section like the existing Group and User, with a single [ Edit ] button.
Possibly this needs fewer presented permissions? I can't see why one would want to allow the public (any member of GP) to Delete Threads/Post, or Moderate, but the permissions are there in the database, so offering them to the user (in an advanced section?) in case they want them might be fine?
As a simple start, just another ACP line with 'Visible to the Public? ' which sets the base needed permissions could be the way to go?
If the game is set to private, presumably the Subforums should all be Private as well? We might want to enforce that (the old 'toggles with the game state' system we had working before?) So maybe this does need to be fixed to as it was, and then we can work on the new options?
I don't have a date when this broke, but I have games where the subforum general permissions are set based on the other factors. Now changing the permissions does not change the general ones anymore. The OP lists examples of two games that behave differently as well.
That bit of PHP is complicated, will many checks if it is group or user or general and special handling of the general case. I can not see any obvious errors, but it is hard to parse in my head.No matter what changes I make, the general permissions remain unchanged.
After creating the subforum's base game 'group', everything default:
SELECT * FROM forums_permissions_groups WHERE forumID = 12282;
(4813, 12282, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0)
SELECT * FROM forums_permissions_general WHERE forumID = 12282;
(12282, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
Changing read permission to yes, sets it for the player, but does not change the general permissions.
SELECT * FROM forums_permissions_groups WHERE forumID = 12282;
(4813, 12282, 2, 0, 0, 0, 0, 0, -2, 0, 0, 0)
SELECT * FROM forums_permissions_general WHERE forumID = 12282;
(12282, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
An old game where the general permissions did change:
SELECT * FROM forums_permissions_groups WHERE forumID = 7944;
(3431, 7944, 0, 0, 2, 2, 2, 2, 0, 0, 0, 2)
SELECT * FROM forums_permissions_general WHERE forumID = 7944;
(7944, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1)
(I can easily include field names if they might help, but they made the lines long and wrappy.)
Was there a point where this actually "worked"? Because I went back through the old code, and I can't see how. The change happened when we dropped Mongo, but I realize I never intended on subforums to be public. There's code on staging right now with the new functionality, but it'll probably disappear through the day as I work on the bbcode issue first.
'Before' the mongo change it did. Quite likely it never did since then.
Bowl showed me there's a flag on threads to allow public posting. I wonder if that conflated things. And yah, there's no way it's worked since. I know I never intended subforums to be accessible; it seems likely this was a modification by Adam. As it's now a feature that's in use, I'll have to figure out how to make it work properly. We have to reassess the "allow public posting" part though.
It seems that the subforums were in fact all readable by everyone, even if the players in the game had been forbidden from reading them. This is opposite to 'never intended subforums to be accessible', they were being left in a readable state for the pubilc.
Adam's patch worked (up till the mongo excision). Hopefully you can work out what the code does ... or, more to the point, why it is not working, the logic there seems valid: 'if the GM changes the group permissions, also change the general READ permissions to match'.
That's a per thread thing, allowing people not in the game to post on those threads in games.
That is not related to forum permissions at all.
Uh... that's exactly a forum permissions thing. Threads don't have permissions. So it has to override the permissions of the forum it's in to work, which means we're adding a new permission layer, but one that's a modifier.
vagueGM says:
Surely, if they can see the thread, this will keep working as it already is?
If the game is private, or the subforum is not visible, then allowing public posting does nothing since people can't see the thread to post in.
This part is working fine. There is no problem here.
I'm not saying I'm going to remove it, but it's related, so whatever changes I make to allowing permissions at the general level of forums will have an effect on this. And likewise, as it's an override, it's likely to create bugs.
vagueGM says:
It seems that the subforums were in fact all readable by everyone, even if the players in the game had been forbidden from reading them. This is opposite to 'never intended subforums to be accessible', they were being left in a readable state for the pubilc.
Adam's patch worked (up till the mongo excision). Hopefully you can work out what the code does ... or, more to the point, why it is not working, the logic there seems valid: 'if the GM changes the group permissions, also change the general READ permissions to match'.
Yah, and that's the weird part... why is a general permission matched to a group's permission? They shouldn't be tied together. They may often align, but aren't directly linked. I'm fine with having general read permissions modifiable, but I had entirely missed that changing the group permissions affects the general permissions, because from a UX and code perspective, it doesn't fit. As always, not blaming Adam for the changes he made, but this one is problematic.
This is based off the `publicPosting` field in the `threads` table. It is just about the thread it is set on. The forum permission affect who can see the thread, `publicPosting` says if people outside the game can post (but only if they can see it in the first place:).
Keleth says:
... why is a general permission matched to a group's permission? ...
I think just the `read` permissions need to bound together. If people can't read the forum, none of the other permissions matter? The fact that they are not in the game prevented most of the other permission from mattering because non-players could not do things like creating or deleting threads and such.
This is based off the `publicPosting` field in the `threads` table. It is just about the thread it is set on. The forum permission affect who can see the thread, `publicPosting` says if people outside the game can post (but only if they can see it in the first place:).
Right, but that's what I'm saying. Threads, in general, don't have their own permissions. This is adding a new permission layer, but just specifically for one use case. Permissions in general have their own mechanisms and logic, and then this just breaks out and does it's own thing. I'm not trying to say it's a bad idea or bad code, but architecturally it is an override, and overrides like this rarely pan out well.
vagueGM says:
I think just the `read` permissions need to bound together. If people can't read the forum, none of the other permissions matter? The fact that they are not in the game prevented most of the other permission from mattering because non-players could not do things like creating or deleting threads and such.
I disagree that any should be bound together. One, it limits GMs in the sense that then they only have the choice of everyone read or no one read. What if they want private info in their public game, for one reason or another? Second, there's no logical connection between the two. As I said, yes, they'll likely be the same all the time, but that just means 2 clicks instead of 1.
... I disagree that any should be bound together. ...
Absolutely. But, at a minimum we could get it back to working the way it did before? Then we can look into giving the GM more finegrained control.
As a test, if you want to set 'read' to 0 (inherit) in forum 12282 we can see if that is sufficient for people to be able to see that Roleplay Archive. I think keeping that at 0, or tied to the group 'read' permission if that is less than 0, is good enough for now?
... While private, you cannot edit general permissions on subforms ...
That seems to be working. I wonder if it might not be better to grey it out rather than removing the whole 'General [ Edit ]' section completely, just because people might be confused about things being in different places (really, only 'higher on the page') depending on the Privacy?
Keleth says:
... If you change a game from private to public, ONLY the root game forum is changed to general read on ...
The sub-forums keep what they were set to last? Or will we have to change them all back after a privacy toggle?
If the game is Private, does it matter what the sub-forums are set to? Can they be seen with a link even if they can not navigated to? If not, we can just leave them set as they were?
Keleth says:
... While public, you can edit the general read permissions (and only read permissions) of a subform ...
The buttons and layout look great.
The Save button does not work. It does not react or seem to click and does not change/save the value. Reloading the page shows it is still at Inherit.
Making the game Private and then Public again set 'read' to No, which seems to do what 'read=no' is meant to do, others can not see that sub-forum. Now it is stuck as No since I can not Save the new value.
Presumably Yes is different to Inherit mainly on sub-sub-forums?
That seems to be working. I wonder if it might not be better to grey it out rather than removing the whole 'General [ Edit ]' section completely, just because people might be confused about things being in different places (really, only 'higher on the page') depending on the Privacy?
Yah, fair point, I can do that.
vagueGM says:
The sub-forums keep what they were set to last? Or will we have to change them all back after a privacy toggle?
You have to set them all back. Otherwise I'd have to keep a record of what they were before, and I don't see people toggling games from public to private and back again frequently enough to warrant that.
vagueGM says:
If the game is Private, does it matter what the sub-forums are set to? Can they be seen with a link even if they can not navigated to? If not, we can just leave them set as they were?
It does matter, because the forums work on optimistic priority. If you're blocked from one source but allowed from a source of equal value, it takes the allowed value.
vagueGM says:
The Save button does not work. It does not react or seem to click and does not change/save the value. Reloading the page shows it is still at Inherit.
Strange. Do you mind trying again with your console open to see if you get a JS error? I can look for PHP errors in the logs. It worked for me on staging, so trying to figure out what the difference in our use cases is.
vagueGM says:
Making the game Private and then Public again set 'read' to No, which seems to do what 'read=no' is meant to do, others can not see that sub-forum. Now it is stuck as No since I can not Save the new value.
Presumably Yes is different to Inherit mainly on sub-sub-forums?
Yes and inherit are always different. However, after your points here, I think changing the subforums to inherit when making a forum private is the better way to go. If you change it to public, it'd stay inherit, thus by default making subforums public, and can be individually blocked if needed.
Ok, updates pushed to fix setting the general permissions on a public game subforum, as well as setting the subforum's read to inherit when a game is made private.
Saving permissions works; changing the game's Private/Public setting does the right thing with the sub-forums; setting the Group permissions to 'no read' also means the General permissions of Inherit (the default) turns off read; setting Group to 'no read' but General to 'yes read' means players in the game can not see the sub-forums but non-players can (strange arrangement, but if someone wants to override Inheriting it, the system supports it:).
The message: "You cannot edit general permissions while a game is private" is clear enough, though it feels like it could use some refining, but this is not a priority, and I don't have specific criticisms or suggestions.
The message: "You cannot edit general permissions while a game is private" is clear enough, though it feels like it could use some refining, but this is not a priority, and I don't have specific criticisms or suggestions.
Yah, def open to changing the text. The AngularJS code is just messy and I threw together what I could.
setting Group to 'no read' but General to 'yes read' means players in the game can not see the sub-forums but non-players can (strange arrangement, but if someone wants to override Inheriting it, the system supports it:).
I will use it this way! ;) The goal is not to "spam" the players that are in separate character groups and distinct posting frequencies with tons of emails and a chaotic homepage.
Public = Yes, Game group = No, Specific players of that sub-forum = Yes.
Each sub-forum is actually a separate but related adventure.
Public = Yes, Game group = No, Specific players of that sub-forum = Yes.
Is your game private? Because if it's public, you can do that as it stands now. If you plan on having the game private but want a subforum public, that won't work with the current code. Plus, you'd need to give people the link to the subforum, because they wouldn't be able to access the root forum to get access to the subforum.
I can’t do that in the current version in prod (the public access for that game sub-forums) because of the original issue with the ACP [ref - the first post in this thread] that prevents external access to them.
But the "Game group = No, Specific players of that sub-forum = Yes." is already done and working =)
Oh, I thought vague was talking about my (admittedly weird) situation where I want my players "not to read" something that they can read if they just logout. =))
[ +- ] why
It's because of the emails, homepage and unread notifications
Oh, I thought vague was talking about my (admittedly weird) situation where I want my players "not to read" something that they can read if they just logout. =))
Feel free to test staging to see if it yields the results you want.
Oh, I thought vague was talking about my (admittedly weird) situation where I want my players "not to read" something that they can read if they just logout. =))
...
Not directly, but, yes, that is the situation I was describing.
Now, for this behaviour, you need to set the sub-forum's General Permissions to Read, if they are at the default of Inherit then logged out players won't be able to see the forum's either. You can make that choice now.
htech says:
... I am unable to test the emails right now ...
They should only receive email notifications if they have manually subscribed to the sub-forum, and they can't do that if they can't see (Read) the sub-forum.
I thought there was code that prevented notification emails from being sent to players who did not have permission to read the posts that generated the notification?
If my test player subscribes to a sub-forum (which they can currently read) and then the GM sets it so they can not see it (I just changed the Group Read Permission), they still get email notifications.
It is then tricky to un-subscribe to that forum. Not everyone knows how to get to the Manage Subscriptions page (or even that it exists, judging from the number of times I have pasted that URL:).
This is not related to General Permissions. The game being Public or Private has no effect. Even after the player leaves the (now Private) game they still get the notification emails about a game they can not even see.
I am not sure if we should consider this a bug (or, not a high priority one, anyway), they are subscribed, after all (and can/should just unsubscribe). I don't think this is the intended behaviour, though, and it leaks information about posts in places people don't have permission to see...
Worse was when I was getting @mentions from private games I was not in. :(
I thought there was code that prevented notification emails from being sent to players who did not have permission to read the posts that generated the notification?
No, there isn't, but it's on my list of tasks, as when you leave a game, it should just unsub you.
vagueGM says:
Worse was when I was getting @mentions from private games I was not in. :(
This is an interesting one, because it'd have to check your permissions when you get notified. Def doable, but obviously frustrating.
Given neither of these are breaking problems and can be side stepped, I don't think it'll be a super high priority, but yes, something to work on.
... as when you leave a game, it should just unsub you.
...
I am not convinced. Maybe on a Private game, but just because someone can not play in a game anymore does not mean they don't want to still follow its progress.
Maybe make it an option in the Leave Game dialog? Maybe default it to no in a Public game and default it to yes (or forced) in a Private game?
I am not convinced. Maybe on a Private game, but just because someone can not play in a game anymore does not mean they don't want to still follow its progress.
Maybe make it an option in the Leave Game dialog? Maybe default it to no in a Public game and default it to yes (or forced) in a Private game?
I think there are a few ways to look at it, but lets move that to it's own thread.
The code with the updated permission controls is now live on prod. Have fun everyone.
That seems to be working.
Note, that this does not 'fix' any existing permissions. If you want your recent subforums to be viewable by the public, you will need to manually set this (or toggle the game to Private and back to Public).