)]}'
{"openstack_dashboard/dashboards/project/access_and_security/api_access/tables.py":[{"author":{"_account_id":2455,"name":"Tihomir Trifonov","email":"t.trifonov@gmail.com","username":"ttrifonov"},"change_message_id":"9d760b7952efe68ae4af576e71e7ca8d7021a1fc","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    url \u003d \"horizon:project:access_and_security:api_access:ec2\""},{"line_number":36,"context_line":"    policy_rules \u003d ((\"compute\", \"compute_extension:certificates\"),)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def _allowed(self, request, datum\u003dNone):"},{"line_number":39,"context_line":"        # Don\u0027t show this item if `ec2` is not a defined service."},{"line_number":40,"context_line":"        for row in self.table.data:"},{"line_number":41,"context_line":"            if row.type \u003d\u003d \u0027ec2\u0027:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_5a9bb972","line":38,"updated":"2014-06-18 13:43:15.000000000","message":"_allowed is used internally in the base class to enforce policy checks, the correct method to override here is allowed()","commit_id":"a5fe89dfa533907540bb9db214dc7e466d34ce2f"},{"author":{"_account_id":2455,"name":"Tihomir Trifonov","email":"t.trifonov@gmail.com","username":"ttrifonov"},"change_message_id":"9d760b7952efe68ae4af576e71e7ca8d7021a1fc","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def _allowed(self, request, datum\u003dNone):"},{"line_number":39,"context_line":"        # Don\u0027t show this item if `ec2` is not a defined service."},{"line_number":40,"context_line":"        for row in self.table.data:"},{"line_number":41,"context_line":"            if row.type \u003d\u003d \u0027ec2\u0027:"},{"line_number":42,"context_line":"                return super(DownloadEC2, self)._allowed(request, datum)"},{"line_number":43,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_5ac0192b","line":40,"updated":"2014-06-18 13:43:15.000000000","message":"Although this works, I find it better to check with is_service_enabled:\n\n    from openstack_dashboard import api\n    ....\n    return api.base.is_service_enabled(request, \u0027ec2\u0027)\n\nThis will add another call(and will need some fixes in the unit tests), but is generally safer to check the api and not table.data.","commit_id":"a5fe89dfa533907540bb9db214dc7e466d34ce2f"}]}
