|
Hello (especially Burt), just looking for an elegant way of checking controller access using the Spring Security Core Plugin. The use case: Show a list of controllers that the current user has access to.
Something like: grailsApplication.controllerClasses.findAll { controller -> /* controller is available to users authority */} Thanks Cheers, Mos --- http://www.mosbase.com/ |
|
Any thoughts on this ?
On Thu, May 12, 2011 at 10:56 AM, Mos <[hidden email]> wrote:
|
|
You can use the sec:access tag for that:
<ul> <g:each var="c" in="${grailsApplication.controllerClasses.sort { it.fullName } }"> <sec:access url='${createLink(controller: c.logicalPropertyName, base: "/")}'> <li class="controller"><g:link controller="${c.logicalPropertyName}">${c.fullName}</g:link></li> </sec:access> </g:each> </ul> Burt > Any thoughts on this ? > > > On Thu, May 12, 2011 at 10:56 AM, Mos <[hidden email]> wrote: > > > Hello (especially Burt), > > > > just looking for an elegant way of checking controller access using the > > Spring Security Core Plugin. > > > > The use case: Show a list of controllers that the current user has access > > to. > > Something like: > > grailsApplication.controllerClasses.findAll { controller -> /* > > controller is available to users authority */} > > > > Thanks > > > > Cheers, > > Mos > > --- > > http://www.mosbase.com/ > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Thanks Burt, cool stuff. I should read you docs more carefully. ;)
Cheers,
Mos --- http://www.mosbase.com/ On Wed, May 18, 2011 at 11:42 PM, Burt Beckwith <[hidden email]> wrote: You can use the sec:access tag for that: |
| Powered by Nabble | Edit this page |
