mei_rt2mei_rt2_fix_1
Last change
on this file since 5f551d3 was
7211a95,
checked in by Mei <mei@…>, 12 years ago
|
1) add more python examples
2) add the missing linking role and linking oset api calls
3) fix the output of time typed data term/oset obj in typed_string format
(transform back from yap time format to our ddddddddTdddddd format
|
-
Property mode set to
100755
|
File size:
1.2 KB
|
Line | |
---|
1 | # |
---|
2 | # This example demonstrates intersections. An intersection is a logical and of |
---|
3 | # roles or osets. An intersection succeeds if the principal is in the |
---|
4 | # intersection of the sets defined by the roles. |
---|
5 | # |
---|
6 | # The policy set by Acme is that a character must both a preferred customer and |
---|
7 | # a WarnerBrothers character to buy rockets. Each of those attributes is |
---|
8 | # specified by a role. |
---|
9 | # |
---|
10 | # This example defines 4 principals, Acme, WarnerBrothers, Coyote and Batman. |
---|
11 | # Credential 1 defines the policy requiring both roles to get the buy_rockets |
---|
12 | # role. Credential 2 gives the Coyote a preferred_customer role. Credential 3 |
---|
13 | # gives Batman the preferred_customer role and Credential 4 recognizes the |
---|
14 | # Coyote as a Warner Brothers character. |
---|
15 | # |
---|
16 | #In order to buy rockets from Acme, you must be BOTH a preferred customer |
---|
17 | #AND a WarnerBros character. In this example, the following query will be |
---|
18 | #successful: |
---|
19 | # |
---|
20 | # Acme.buy_rockets <-?- Coyote |
---|
21 | # |
---|
22 | #The following query will fail (because Batman does not have the |
---|
23 | #attribute WarnerBros.character): |
---|
24 | # |
---|
25 | # Acme.buy_rockets <-?- Batman |
---|
26 | # |
---|
27 | # Acme.buy_rockets <- Acme.preferred_customer & WarnerBros.character |
---|
28 | # Acme.preferred_customer <- Coyote |
---|
29 | # Acme.preferred_customer <- Batman |
---|
30 | # WarnerBros.character <- Coyote |
---|
Note: See
TracBrowser
for help on using the repository browser.