Verify PolicyType on service and offline client side 77/33677/3
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Tue, 13 Jan 2015 19:38:08 +0000 (20:38 +0100)
committerLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Thu, 15 Jan 2015 09:59:33 +0000 (10:59 +0100)
commite4876487e05d76dd9dfbedd8016936ed112a6b18
treecfe62a9f50d1aac1cd72744093965260947a00ad
parent2dea730a1b51ef962e5a032049e6ae777d03162a
Verify PolicyType on service and offline client side

Verification of PolicyTypes was removed from libcynara-admin library.
Now it is added to Cynara service and cynara offline admin with full
plugin support. It means, that validation passes only for predefined
types or types provided by loaded cynara service plugins.
In case, the validation fails, new CodeResponse::Code::NO_POLICY_TYPE
value is returned from service to libcynara admin side and
CYNARA_API_INVALID_PARAM is returned from cynara_admin_set_policies()
or cynara_admin_set_bucket() functions.

Change-Id: Id1a85aafaa4feb31d8513e819c78736813a9ff38
src/admin/logic/OfflineLogic.cpp
src/admin/logic/OfflineLogic.h
src/admin/logic/OnlineLogic.cpp
src/common/exceptions/UnknownPolicyTypeException.h [new file with mode: 0644]
src/common/plugin/PluginManager.cpp
src/common/plugin/PluginManager.h
src/common/response/CodeResponse.h
src/service/logic/Logic.cpp
src/service/logic/Logic.h