Code Monkey home page Code Monkey logo

Comments (4)

xenocrat avatar xenocrat commented on July 17, 2024

A totally private site is quite a niche requirement. This can be handled by writing a simple module that responds to the "can_not_view_site" trigger and displays a custom/standalone login page including specific instructions telling the user how to acquire a login if they don't have one (i.e. a paywall). Maybe I'll put something together to show how it could be done.

If you want to use the default login form but you are worried about leaking data, you can wrap the display of those things in {% if visitor.group.can("view_site") %} Twig conditional.

from chyrp-lite.

xenocrat avatar xenocrat commented on July 17, 2024

It would be easy to raise a Flash warning and redirect to the login page instead of throwing an error in index.php. This would certainly make it easier for registered users to log in, but I need to think over the implications of this change before I implement it.

from chyrp-lite.

 avatar commented on July 17, 2024

wrap the display [...] in Twig conditional

That's what I did for my live site. I still think that no View Site permissions shouldn't display the site at all, to be concordant with the name. Otherwise it could be renamed to something like View Published Content.

paywall

Vade retro! You can also have a private site for your family or a small group of known people :)

from chyrp-lite.

xenocrat avatar xenocrat commented on July 17, 2024

In the end it's just two paths to the same solution. For the few admins who prefer enhanced privacy a couple of Twig conditionals do the trick. On the flip side, if an admin likes the current behaviour and I change it, they'll have to write a module just to revert it. I prefer to encourage customisations in Twig whenever possible because of the friendly syntax and reduced scope for screwing things up.

from chyrp-lite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.