Possible bug in 2.1 beta 3 for permissions - cross check
Hello all,
I'm just looking at 2.1 beta 3 for my forum and I spotted that the "New Discussion" button is shown when not logged in. If I click on it and try to submit a post it gives an error, which is fair enough, but I'm wondering why that button is there at all.
I just wanted to ask if anyone else who is using 2.1 beta 3 could check if this is the case for them as well incase I have a config error, before I open a bug report?
I've traced it back to the Vanilla.Discussions.Add
permission, which on my forum, when not logged in is:
[Vanilla.Discussions.Add] => Array ( [0] => -1 )
If I add a check into class.session.php
on line 128 for $Permissions[$Permission][0] != -1
then the button disappears as expected, but that doesn't seem right to me...
Thanks,
Allan
Comments
I am not sure, but this may be the desired functionality to entice sign ups.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
I wondered that as well, but if so, then showing a sign up form, rather than validation errors would be much nicer UX.
Sorry to bump, but there must be others running 2.1 beta 3 out there? Could you try looking at your forum when not logged in and checking if the "New Discussion" button is shown or not?
@allanj
If you think this is a bug, you should be reporting it on GitHub, rather than on here.
Posted here: https://github.com/vanillaforums/Garden/issues/1855 .
I just don't want to waste the dev's time if this was an error that others couldn't reproduce.
@allanj : FYI: Did the Update to B3 yesterday... no "new Discussion" Button when not logged in... just the Login and Register Buttons as normal...
You can make sure the button does not show when not logged in . Even if the button shows, it will redirect to sign in. You can add a regular link to see what I mean. The button will show but will not allows posting if not logged in.
The link has the permissions array('Garden.SignIn.Allow')
$this->Menu->AddLink('New Discussion', T('New Discussion'),'/post/discussion',array('Garden.SignIn.Allow'));
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I suspect the issue is that Guests are allowed to post in one of your categories (review your permissions), or your guest role is set incorrectly (review /role/defaultroles)
Sorry for the delay - you were absolutely right Lincoln. My default permissions in my 2.1 install were an absolute mess - newly registered users were admin... :-/. Something somewhere has gone wrong, but all fixed now.
did you by chance import data from a different forum than vanilla. or maybe use porter.
if so, it is a known feature that permissions occassionally get whacked out on importing from a ported forum.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.