Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: landyvlad on March 13, 2019, 03:13:29 AM

Title: Permission dramas
Post by: landyvlad on March 13, 2019, 03:13:29 AM
On my forum  (https://www.droneflightforum.com/index.php?action=forum)I have numerous boards but by way of example under category 'Picture and Video Showcase' I have boards

Videos by Drone
Photos by Drone
Panos by drone
etc


ONLY the photos by drone is visible to regular members. As admin I can naturally see ALL of them.

Permissions appear to be set identical - the 'regular members' checkbox is ticked.

I'm not using deny permissions and not using post count based groups permissions.

I did try activating the latter, but given the attributes are all inherited form 'regular member' anyway it of course made no difference.

I have a few boards that I specifically wanted to hide, which I did by accessing board permissions and  under "allowed groups" where for those boards I specifically WANTED to hide, only global mod is checked (not regular members).

So I rechecked all the boards I'm having problems with and they all DO have regular members ticked.



Help?
Title: Re: Permission dramas
Post by: SychO on March 13, 2019, 05:24:32 AM
I just did some testing and it appears this is a bug
logged on github https://github.com/SimpleMachines/SMF2.1/issues/5514
Title: Re: Permission dramas
Post by: landyvlad on March 13, 2019, 06:02:02 AM
Well that's super frustrating.... I've invited people to my new forum and managed to upset them already LOL

Is there a work around?
Title: Re: Permission dramas
Post by: SychO on March 13, 2019, 06:47:31 AM
yea, you can either apply the fix I posted here: https://github.com/SimpleMachines/SMF2.1/pull/5515/files
or you can use post based membergroups to allow access to boards
Title: Re: Permission dramas
Post by: landyvlad on March 13, 2019, 06:59:12 AM
Might sound silly but don't the PBMG just inherit permissions from the default profile?
That also seems a painful workaround for future issues, I'd rather make a code change :)

Would you be kind enough to put here in code tags, like
(find) ...
(add after)...  or
(replace with) ...

as I'm unsure exactly what to do with that GH info. Unless its as simple as deleting the red line and replacing it with the green line?
Title: Re: Permission dramas
Post by: SychO on March 13, 2019, 07:05:51 AM
Might sound silly but don't the PBMG just inherit permissions from the default profile?

It does inherit, but the issue is that when you check the box for Regular Membergroups and save, it doesn't actually save the data for Regular Members, that's why it doesn't take effect.

as I'm unsure exactly what to do with that GH info. Unless its as simple as deleting the red line and replacing it with the green line?

exactly

Sources/Subs-Boards.php

Find
Code: [Select]
if (!empty($boardUpdateParameters['deny_groups']))Replace with
Code: [Select]
if (!empty($boardOptions['deny_groups']))
Find
Code: [Select]
if (!empty($boardUpdateParameters['member_groups']))Replace with
Code: [Select]
if (!empty($boardOptions['access_groups']))
Title: Re: Permission dramas
Post by: landyvlad on March 13, 2019, 07:10:12 AM
Bad news I did those edits and saved it. Opened it again to double check it had been saved.
Still no good I'm afraid.

Title: Re: Permission dramas
Post by: Arantor on March 13, 2019, 07:11:12 AM
Note that actual permissions are different and completely separate from board access and inheritance of permissions does not apply to board access.
Title: Re: Permission dramas
Post by: landyvlad on March 13, 2019, 07:15:35 AM
Umm so what does that mean in relation to access - should that pull request info (as above) not have fixed the access problem?
Title: Re: Permission dramas
Post by: landyvlad on March 13, 2019, 07:20:16 AM
Update: having found that issue, I now have to go into the affected boards, uncheck and then recheck the boxes for groups allowed access, click modify, and it WORKS !!!

Thanks
Title: Re: Permission dramas
Post by: Arantor on March 13, 2019, 07:23:42 AM
Umm so what does that mean in relation to access - should that pull request info (as above) not have fixed the access problem?

It means that the above pull request is right and that you’re conflating two unrelated things ;)
Title: Re: Permission dramas
Post by: SychO on March 13, 2019, 07:24:39 AM
yea you have to go back and re-save the board options after making the file edits

anyway, thanks for the report.
Title: Re: Permission dramas
Post by: woolly bugger on March 13, 2019, 12:15:44 PM
yeah, this caused some "uncomfortable" moments on my board when the upgrade revealed a secret board to general members, I had to scramble to change permissions, but also had to admit "hurt" members to the secret board....
Title: Re: Permission dramas
Post by: Kindred on March 13, 2019, 12:28:40 PM
and, yet another reason to not use beta and RC releases on production sites. :P
Title: Re: Permission dramas
Post by: TurtleKicker on March 13, 2019, 02:05:21 PM
and, yet another reason to not use beta and RC releases on production sites. :P
Well, admittedly, the release announcement for RC1 stated:

Quote
The term "Release Candidate" means that the developers believe this version of the software is reliable enough to be installed and used on production websites.

Title: Re: Permission dramas
Post by: Kindred on March 13, 2019, 03:44:11 PM
yeah, me and the leads will have to disagree on that point. :P
Title: Re: Permission dramas
Post by: vbgamer45 on March 13, 2019, 03:56:44 PM
I would agree mixed messages. I wait for final for your main sites. Since you have to redo your mods/theme changes that you make on your site.
Title: Re: Permission dramas
Post by: Arantor on March 13, 2019, 03:57:46 PM
Or, more simply, beliefs can be wrong...
Title: Re: Permission dramas
Post by: landyvlad on March 13, 2019, 11:58:18 PM
Well I started a brand new site and as RC1 was released I elected to use it.

The existing site (2.0.15) will remain so until 2.1 final is released AND all the mods I use are compatible (or a suitable alternative is).

So I have a foot on both camps !

yea you have to go back and re-save the board options after making the file edits
anyway, thanks for the report.

Cool, just letting you know in case you didn't realise that. But moreso to make it clear to others who may view this thread in future as to what's required to 'fix' the issue.

Thank YOU for the prompt fix :)


Umm so what does that mean in relation to access - should that pull request info (as above) not have fixed the access problem?
It means that the above pull request is right and that you’re conflating two unrelated things ;)

Yeah my fault, a terminology issue.  But all sorted now. Cheers.
Title: Re: Permission dramas
Post by: Sesquipedalian on March 14, 2019, 01:28:23 AM
and, yet another reason to not use beta and RC releases on production sites. :P
Well, admittedly, the release announcement for RC1 stated:

Quote
The term "Release Candidate" means that the developers believe this version of the software is reliable enough to be installed and used on production websites.

Actually, the release announcement stated:
Quote
The term "Release Candidate" means that the developers believe this version of the software is reliable enough to be installed and used on production websites. Nevertheless, you should still expect to encounter minor bugs in SMF 2.1 RC1. We encourage you to report any bugs you find.
You can and should expect bugs.


Or, more simply, beliefs can be wrong...
...which is exactly why that particular word was chosen, yes. :)
Title: Re: Permission dramas
Post by: Sesquipedalian on March 14, 2019, 01:57:06 AM
Fix has been merged.
Title: Re: Permission dramas
Post by: TurtleKicker on March 14, 2019, 02:25:19 AM
Looks like this fix is squeaking into RC2. Yay!
Title: Re: Permission dramas
Post by: landyvlad on March 15, 2019, 07:36:04 AM
Sweet.