summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkihiro Motoki <amotoki@gmail.com>2018-05-18 14:29:53 +0900
committerAkihiro Motoki <amotoki@gmail.com>2018-05-18 15:54:31 +0900
commit3a849a04104564fca24002f2cd6586b23ee147b5 (patch)
treeb407e2ed14becf0c9300cc12dd0df91869de9239
parent48949f5e20aff2f5caa3cad48666b13b8be91f29 (diff)
downloadoslo-policy-3a849a04104564fca24002f2cd6586b23ee147b5.tar.gz
Fix document formatting
After openstackdocstheme migration, extra whitespaces at the beginning of lines lead to vertical lines and different fonts in rendered HTML. This commit cleans up them for readability. Change-Id: I27f25d068cff801dd4702278ecf8be14baebc890
-rw-r--r--oslo_policy/policy.py64
1 files changed, 32 insertions, 32 deletions
diff --git a/oslo_policy/policy.py b/oslo_policy/policy.py
index 4034fff..6749c18 100644
--- a/oslo_policy/policy.py
+++ b/oslo_policy/policy.py
@@ -37,24 +37,24 @@ easier for most people to understand.
In the policy language, each check is specified as a simple "a:b" pair that is
matched to the correct class to perform that check:
- +--------------------------------+------------------------------------------+
- | TYPE | SYNTAX |
- +================================+==========================================+
- |User's Role | role:admin |
- +--------------------------------+------------------------------------------+
- |Rules already defined on policy | rule:admin_required |
- +--------------------------------+------------------------------------------+
- |Against URLs¹ | http://my-url.org/check |
- +--------------------------------+------------------------------------------+
- |User attributes² | project_id:%(target.project.id)s |
- +--------------------------------+------------------------------------------+
- |Strings | - <variable>:'xpto2035abc' |
- | | - 'myproject':<variable> |
- +--------------------------------+------------------------------------------+
- | | - project_id:xpto2035abc |
- |Literals | - domain_id:20 |
- | | - True:%(user.enabled)s |
- +--------------------------------+------------------------------------------+
++--------------------------------+------------------------------------------+
+| TYPE | SYNTAX |
++================================+==========================================+
+|User's Role | role:admin |
++--------------------------------+------------------------------------------+
+|Rules already defined on policy | rule:admin_required |
++--------------------------------+------------------------------------------+
+|Against URLs¹ | http://my-url.org/check |
++--------------------------------+------------------------------------------+
+|User attributes² | project_id:%(target.project.id)s |
++--------------------------------+------------------------------------------+
+|Strings | - <variable>:'xpto2035abc' |
+| | - 'myproject':<variable> |
++--------------------------------+------------------------------------------+
+| | - project_id:xpto2035abc |
+|Literals | - domain_id:20 |
+| | - True:%(user.enabled)s |
++--------------------------------+------------------------------------------+
¹URL checking must return ``True`` to be valid
@@ -72,17 +72,17 @@ policy rule::
Operator precedence is below:
- +------------+-------------+-------------+
- | PRECEDENCE | TYPE | EXPRESSION |
- +============+=============+=============+
- | 4 | Grouping | (...) |
- +------------+-------------+-------------+
- | 3 | Logical NOT | not ... |
- +------------+-------------+-------------+
- | 2 | Logical AND | ... and ... |
- +------------+-------------+-------------+
- | 1 | Logical OR | ... or ... |
- +------------+-------------+-------------+
++------------+-------------+-------------+
+| PRECEDENCE | TYPE | EXPRESSION |
++============+=============+=============+
+| 4 | Grouping | (...) |
++------------+-------------+-------------+
+| 3 | Logical NOT | not ... |
++------------+-------------+-------------+
+| 2 | Logical AND | ... and ... |
++------------+-------------+-------------+
+| 1 | Logical OR | ... or ... |
++------------+-------------+-------------+
Operator with larger precedence number precedes others with smaller numbers.
@@ -123,9 +123,9 @@ policy enforcement.
Generic checks can be used to perform policy checks on the following user
attributes obtained through a token:
- - user_id
- - domain_id or project_id (depending on the token scope)
- - list of roles held for the given token scope
+- user_id
+- domain_id or project_id (depending on the token scope)
+- list of roles held for the given token scope
.. note::
Some resources which are exposed by the API do not support policy