Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A administrate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • thoughtbot, inc.
  • administrate
  • Issues
  • #1835
Closed
Open
Issue created Nov 26, 2020 by Pablo Brasero@pablobmContributor

Should Administrate handle request parameters differently?

(Bringing here a comment that I left at https://github.com/thoughtbot/administrate/pull/1773#discussion_r510007829, for visibility and discussion.)

Search params are sanitized at the bottom (templates/helpers), with information about what's allowed flowing top-to-bottom

  1. Dashboard/template figures out which params it allows.
  2. It renders partial and tells it "please allow these params along with those you allow"

I wonder if this should be sanitized a the top (the controller), with this info flowing bottom-to-top:

  1. Dashboards need to publish which params they allow
  2. Controller asks for lists, then sanitises params before rendering the top template.
  3. Templates don't need to know about sanitising.
Assignee
Assign to
Time tracking