Adding ifAllowed method to policy
Bug #1491180 reported by
Thai Tran
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Medium
|
Thai Tran |
Bug Description
Policy current returns a response object containing the allowed field, which either is true or false. To simplify this a bit, we need a wrapper method ifAllowed that would return a promise that either resolves or rejects. If it resolves, the success handler is called, and if it rejects, the error handler is called. This is more useful in practice and negates the need to check the response object. Furthermore, this is useful for creating a hz-if-policies directive in the future.
Changed in horizon: | |
assignee: | nobody → Thai Tran (tqtran) |
status: | New → In Progress |
Changed in horizon: | |
milestone: | liberty-3 → liberty-rc1 |
Changed in horizon: | |
milestone: | liberty-rc1 → next |
Changed in horizon: | |
milestone: | next → none |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/217982 /git.openstack. org/cgit/ openstack/ horizon/ commit/ ?id=75e3f9b9a89 2e7c562ed7e3d8a 90f734297963a0
Committed: https:/
Submitter: Jenkins
Branch: master
commit 75e3f9b9a892e7c 562ed7e3d8a90f7 34297963a0
Author: Thai Tran <email address hidden>
Date: Wed Sep 30 09:59:22 2015 -0700
Adding ifAllowed method to policy service
Policy current returns a response object containing the allowed field,
which either is true or false. To simplify this a bit, we need a wrapper
method ifAllowed that would return a promise that either resolves or
rejects. If it resolves, the success handler is called, and if it rejects, the error
handler is called.
This is more useful in practice and negates the need to check the response
object. Furthermore, this is useful for creating a hz-if-policies directive in
the future. The user table controller is included in this patch to show how it
can be use in practice.
Change-Id: I58d088cfe2df00 1c9252697592ad0 3a217cdb30a
Closes-Bug: #1491180