• Resolved eavenhuang32

    (@eavenhuang32)


    Dear experts,

    I wanted to set some certain pages that users need to log in first, before they can see the contents. I found that after the new pages are created, they will be placed under Private Pages, this is inconvenient for our purpose.

    Is there any way that we can set the default pages/posts as public pages (instead of private) in Authorizer?

    Thanks a lot!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author pkarjala

    (@pkarjala)

    Hi, currently there is not a setting available for this in Authorizer. The general presumption is that if you only want logged in users to view content, all new content should also be prevented from public viewing for privacy/security reasons by default to prevent accidental posting of public content.

    That said, I will check in to see if “public by default” is a feature we will consider implementing.

    Plugin Author Paul Ryan

    (@figureone)

    You can also hook into authorizer_has_access and add your custom code to determine which pages are public and private. Return true if the page currently being requested is public, and false if private.

    See:
    https://github.com/uhm-coe/authorizer/blob/master/src/authorizer/class-authorization.php#L503-L521

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Authorizer’ is closed to new replies.