Hi,

I had problems using app-schema plugin with a security authorization module
I have written (using ResourceAccessManager).
I did some debugging and came to code that did some strange casting using
/org.geotools.data.DataStore/.

Author of code is Andrea Aime and I am wondering if someone can review that
part of code.

*org.geoserver.security.decorators.SecuredDataStoreInfo*

method: DataStore getDataStore(ProgressListener listener)

this method does return with following cast:

/return (DataStore) SecuredObjects.secure(ds, policy);/

But there are situations when secure() returns DataAccess that can not be
cast to DataStore.

What I did is I changed return type of getDataStore to DataAccess. That
solved my problem.
/DataAccess /is also return type of super /DecoratingStoreStoreInfo/ class
that /SecureDataStoreInfo /extends.

Configuration that I am using:
GeoServer 2.5.2 with app-schema extension.

Code is somehow complex (casting and generics), so suggestions are highly
appreciated.



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Security-Decorator-Issue-tp5185447.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to