Remove checking PolicyType in libcynara-admin 76/33676/2
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Tue, 13 Jan 2015 17:05:20 +0000 (18:05 +0100)
committerLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Thu, 15 Jan 2015 09:58:40 +0000 (10:58 +0100)
commit2dea730a1b51ef962e5a032049e6ae777d03162a
tree3aac06d2ad149b33223e422acbdeb1a3f3447226
parent5999e3ccaad8da0b7c70240714cbe168905f0437
Remove checking PolicyType in libcynara-admin

Two libcynara-admin API functions:
* cynara_admin_set_policies
* cynara_admin_set_bucket
have checked validity of PolicyType. Except for special values
(like NONE, BUCKET, DELETE) they accepted only ALLOW and DENY
policy types. No other policy types defined by plugins were able
to be set.

This patch removes described checks leaving only special values
handling. All other types (including ALLOW and DENY) are passed
to cynara service.

The only check that is done verifies if given policy type can
be casted into Cynara::PolicyType.

Change-Id: Iedb0434bd35d4085e977fe86d07ed33a1f89cdc7
src/admin/api/admin-api.cpp