IKANOW / Aleph2

The IKANOW v2 meta-database and analytics platform
Apache License 2.0
2 stars 1 forks source link

Implement SecuredServiceCrud for API calls #89

Open Alex-Ikanow opened 8 years ago

Alex-Ikanow commented 8 years ago

From discussion

"what i eventually wanted was to have a SecuredServiceContext ... that wraps the ServiceContext and passes the "secured" down as far as it will go ... service_context.getDocumentService().getDataService().getReadableCrudService(bucket) ... and it would auto pass the levels of security down ... so basically you'd need a wrapper for every object type ... which would then return a new wrapper if it didn't support security, or pass int the secured if so ... (or prevent access altogether if an underlying method has no concept of security yet) ... so it's a mini faff, there's probably ~10-15 of such objects ... but then once it's done you can never accidentally forget to apply security ... "