Made SecurityService non-transactional
Added permission check to deleteDocument
rest and uploadFile now throw ApiExceptions upon failure
- REST Api now throws ApiExceptions
- Added Exception handler for ApiExceptions
- Added permission checks in ApiController