I found this topic on the mailing list from a few years ago. I'm
building an extension that supports site user registration and login.
I would like to be able to support two ways of restricting access to
page content. I would like to create a different page type that would
require login to be seen, such as:

class SecurePage < Page
end

and I'd like to create tags for displaying content only if a user is
logged in and only if a user is not logged in, such as:

<r:if_authenticated>Secret information</r:if_authenticated>
<r:unless_authenticated>Public information</r:unless_authenticated>

Previous suggestions on this thread said that it would be best (due to
the caching mechanism) to use a separate controller for secure pages
and create routes such that all pages hosted under a certain subdir
slug were protected:

http://groups.google.com/group/radiantcms/msg/c6d0c6da863e33a5

But this seems like it would conflict with my goal of securing content
by page type and by tags, or at least that it would make the system a
little kludgier--secure pages or pages with partially secure content
would need to be hosted under a separate subdir. Can any of you who
are more familiar with Radiant think of a good way of modifying the
existing site controller for this functionality? My preference would
be to modify the existing controller as minimally as possible so that
all of Radiant's other functionality continued to work normally on
these secure pages.

Thanks,
Carl

Reply via email to