Giter Club home page Giter Club logo

Comments (4)

evernat avatar evernat commented on August 17, 2024

First, if you use spring security, then adding just the following in Config.groovy is supposed to work:

grails.plugins.springsecurity.interceptUrlMap = [
                '/monitoring/**': ['ROLE_ADMIN'],
]

Otherwise, you should note that the "monitoring" url of melody is not a controller, it's a filter. So I don't think that the following would work: monitoringController(controller:'monitoring', action:'*')

And I don't know how to make it work in SecurityFilters.groovy

from grails-melody-plugin.

kdorff avatar kdorff commented on August 17, 2024

Sadly, I'm not using Spring Security, my app has no need for it. Standard filters, with the exception of Melody, suited all of my needs (and my security design doesn't lend itself to SpringSecurity).

from grails-melody-plugin.

sergiomichels avatar sergiomichels commented on August 17, 2024

Grails filters are intended to use only when you have a controller and action, so it not works with url's that a filter responds (like Melody). To accomplish that you will need to write a plain Java filter that runs before the Melody filter.

Here's an example of Servlet filter in Grails.

from grails-melody-plugin.

sergiomichels avatar sergiomichels commented on August 17, 2024

@kdorff I'm closing this, since the security depends on your implementation, and there's no way to do it with a Grails filter, since monitoring is not a controller.

P.S: off-topic, but I suggest you to take a look at the security plugins available in Grails. They are well tested and should provide a more standard approach to your projects.

from grails-melody-plugin.

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.