Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Guest View Permissions

r0obertr0obert
edited June 2014 in Vanilla 2.0 - 2.8

My community is using the Private Community add-on & the Basic Pages application. (Vanilla v2.1 stable)

I would like guests to be able to view Basic Pages.

I tried to uncheck "Use custom view permission for roles? If unchecked, then this page will visible to anyone." but Guests still cannot access the pages.

I also checked that option, but gave Guests permissions to view the two pages created using Basic Pages, and they still get redirected to the Sign-in page.

Thanks for your help!

Comments

  • edited June 2014

    The Private Community addon works by adding a button to the dashboard to switch the Garden.PrivateCommunity config setting on or off. This config setting is built into Vanilla. All requests from guests are redirected to the sign in page if this config setting is enabled, so the guest permission procedures of addons such as Basic Pages are never reached.

    I'll try to make it work with the private community feature by hooking into one of the events, such as the BeforeBlockDetect event, in the Dispatch method in /library/core/class.dispatcher.php. I'll let you know if I get it to work with the private community feature.

    Add Pages to Vanilla with the Basic Pages app

  • @Shadowdare thanks!

  • @Shadowdare said:
    I'll try to make it work with the private community feature by hooking into one of the events, such as the BeforeBlockDetect event, in the Dispatch method in /library/core/class.dispatcher.php. I'll let you know if I get it to work with the private community feature.

    Any news?

  • @r0obert‌, I've managed to make it work around the private community feature, but I've run into another error with the custom view permissions, so I'll have to figure out what's causing the error. I'll release the next version as soon as I get the error fixed.

    Add Pages to Vanilla with the Basic Pages app

  • @Shadowdate sounds great, thanks a lot! Looking forward for the next update!

  • @r0obert‌, just uploaded Basic Pages v2.1.3. Let me know if it works.

    Add Pages to Vanilla with the Basic Pages app

  • @Shadowdare‌ works perfectly, thank you very much!

  • Can I make this work with http://vanillaforums.org/addon/guestdefaultroute-plugin ?

    eg. redirecting guests to a page created using basic pages app.

  • @r0obert, I'm not familiar with that plugin. Does putting in the page path like /page/your-page-slug as the redirection path work?

    Add Pages to Vanilla with the Basic Pages app

  • r0obertr0obert
    edited June 2014

    @Shadowdare said:
    r0obert, I'm not familiar with that plugin. Does putting in the page path like /page/your-page-slug as the redirection path work?

    Unfortunately not, guest is redirected to sign-in and they get this URL in browser:

    http://www.My-Website-URL-Here.com/entry/signin?Target=dashboard/home/filenotfound

  • edited June 2014

    @r0obert‌, with the Guest Default Route plugin, I was able to use /page/your-page-slug with no problem. That's with the Private Community feature disabled.

    The Private Community feature uses Gdn::Request()->Path() to compare to paths allowed. The Guest Default Route plugin doesn't use redirection; it changes the DefaultController route for guests, so Gdn::Request()->Path() still returns "", which is always redirected to the sign in page when the Private Community feature is enabled.

    You should post under the plugin's page or modify it.

    Add Pages to Vanilla with the Basic Pages app

Sign In or Register to comment.