>>>>> Steinar Bang <s...@dod.no>:

> This filter already knows the WebEnvironment
>  
> https://github.com/steinarb/oldalbum/blob/master/oldalbum.web.security/src/main/java/no/priv/bang/oldalbum/web/security/OldAlbumShiroFilter.java#L58

> It knows nothing about the database status, however.

> But since this is OSGi I can get an OldAlbumService injected:
>  
> https://github.com/steinarb/oldalbum/blob/master/oldalbum.services/src/main/java/no/priv/bang/oldalbum/services/OldAlbumService.java#L30

> And then I can call OldAlbumService.fetchAllRoutes() to get all paths
> that have login settings and add them to the urls section (so to speak),
> in the correct order.

> The would require a restart to pick up any filter changes, but it is a
> start.

Of course I won't have to restart all of karaf, or even the application.

It would be enough to restart the filter bundle, ie. this one:
 https://github.com/steinarb/oldalbum/tree/master/oldalbum.web.security

So maybe I could somehow trigger a reload of the shiro filter bundle
when the album and/or picture access changes?

Feels a little bit like a hack though...?

And I risk reloading in an inconsistent state for the editing of an
album and its pictures isn't atomic.

Hm...

Reply via email to