Code Monkey home page Code Monkey logo

Comments (11)

intellectronica avatar intellectronica commented on July 27, 2024

Maybe that's something that should be differentiated using permissions? For example, let superusers see (and edit) the apphook configs, but hide them for mere mortals?

from aldryn-newsblog.

yakky avatar yakky commented on July 27, 2024

This case is already handled by the django admin
Wondering if there should be a setting to hide this altogether (related to divio/aldryn-apphooks-config#11)

from aldryn-newsblog.

intellectronica avatar intellectronica commented on July 27, 2024

If exposing it to superusers is already available, I'm not sure why it's necessary to hide it completely. I'm probably not understanding something.

from aldryn-newsblog.

yakky avatar yakky commented on July 27, 2024

Sometimes (not-so-large deployments) super users are not educated enoughto be able to work on namespaces so this should be protected from accidental changes
Or say you only have one namespace and you don't really need any further setting (see #65)

from aldryn-newsblog.

intellectronica avatar intellectronica commented on July 27, 2024

Right, so it makes sense to have a setting. Hide it by default, but if the setting is True show the admin. That way we can enable it for large and complex installations and most users wont have to worry about this.

from aldryn-newsblog.

mikek avatar mikek commented on July 27, 2024

Configurable option sounds good. And what about choosing it via the select (foreign key) in admin? Is it ok to keep it visible and editable for everyone allowed to edit the object that has a FK to AppHookConfig?

from aldryn-newsblog.

yakky avatar yakky commented on July 27, 2024

I was thinking about having a "static" setting that says "show the apphookconfig in the admin index"
Then the rest is up to the django authorization system
Actually what you are proposing is more a row-level permission system, which perfectly fits the scope of newsblog, but I think it's much broader topic

from aldryn-newsblog.

mikek avatar mikek commented on July 27, 2024

@yakky no objections from me, as long as the newsblog admin forms will be still usable.

from aldryn-newsblog.

yakky avatar yakky commented on July 27, 2024

No changes wrt forms
It's just a trick to hide the item in the admin list

from aldryn-newsblog.

mkoistinen avatar mkoistinen commented on July 27, 2024

-1 (sorry!)

I hate to be a dissenter here, but "super user" is by definition one who can control anything. If we're worried that they may do something wrong, this logic can easily be extended to so many other things. Why is apphooks_config more sensitive to "accidental changes" than anything else?

I believe that if a specific project needs this, then, can't that specific project un/register their own admin class to cater to their specific needs?

from aldryn-newsblog.

mkoistinen avatar mkoistinen commented on July 27, 2024

What we have done, is to update the CMS Toolbar for the app to automatically choose the correct app_config for the users when: producing an Article list or creating a new Article. This should make things very easy and flexible for users who know what they're doing too.

from aldryn-newsblog.

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.