资 源 简 介
Chimp is permission based filtering component for Adobe Flex and AIR. Applications implement Chimp by adding metadata within the Flex UIComponents. Based on the metadata it will remove components completely, enable/disable, and update visibility.
Quick Setup:
1) Download and add the chimp.swc to your project library
2) Add compiler argument to keep necessary metadata:
-locale en_US -keep-as3-metadata+=Protected
3) Load the Chimp in your application. The Chimp must be loaded but before children are added because they are tracked with an event listener on the add to stage system event:
Chimp.load(perms);
4) Add metadata to your Flex components:
[Protected(permissions="ROLE_ADMIN",notInPermissionAction="removeChild",componentId="this")]
[Protected(permissions="ROLE_UPDATE",inPermissionAction="enable",componentId="upd