)]}'
{"doc/source/property-protections.rst":[{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"d6011b52e994bf0f7a816a28d4adff928c5b7ac9","unresolved":false,"context_lines":[{"line_number":53,"context_line":"successfully.**"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"In the list of user roles, ``@`` means all roles and ``!`` means no role."},{"line_number":56,"context_line":"**If any of the keys are specified both at the time. then the glance api service"},{"line_number":57,"context_line":"will not start**"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":6,"id":"AAAAUH%2F%2F6TA%3D","line":56,"updated":"2014-01-06 22:00:51.000000000","message":"I think this could be a little clearer. Like if both @ and ! are specified for the same rule, then...","commit_id":"d9d5df2a8e22b6ef9e735c76edbfbe282ef0ece9"}],"glance/common/property_utils.py":[{"author":{"_account_id":7817,"name":"Thomas Leaman","email":"thomas.leaman@hp.com","username":"bugsduggan"},"change_message_id":"2b64c3993885f3f1bb372bc11aa7d3dbe7e6b9a0","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                        if \u0027@\u0027 in permissions and \u0027!\u0027 in permissions:"},{"line_number":111,"context_line":"                            msg \u003d _("},{"line_number":112,"context_line":"                                \"Malformed property protection rule \u0027%s\u0027: \u0027@\u0027 \""},{"line_number":113,"context_line":"                                \"and \u0027!\u0027 are mutually exclusive\") % operation"},{"line_number":114,"context_line":"                            LOG.error(msg)"},{"line_number":115,"context_line":"                            raise exception. \\"},{"line_number":116,"context_line":"                                InvalidPropertyProtectionConfiguration()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9Jek%3D","line":113,"updated":"2013-12-16 10:16:27.000000000","message":"I think it would be more useful to show the rule that we\u0027re matching here, rather than the operation.","commit_id":"a518db832e7552c7eca68167b156cfd4b1c368c1"},{"author":{"_account_id":7817,"name":"Thomas Leaman","email":"thomas.leaman@hp.com","username":"bugsduggan"},"change_message_id":"2b64c3993885f3f1bb372bc11aa7d3dbe7e6b9a0","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            if rule_exp.search(str(property_name)):"},{"line_number":171,"context_line":"                rule_roles \u003d rule.get(action)"},{"line_number":172,"context_line":"                if rule_roles:"},{"line_number":173,"context_line":"                    if \u0027@\u0027 in rule_roles:"},{"line_number":174,"context_line":"                        return True"},{"line_number":175,"context_line":"                    elif \u0027!\u0027 in rule_roles:"},{"line_number":176,"context_line":"                        return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9JeI%3D","line":173,"updated":"2013-12-16 10:16:27.000000000","message":"I think it would be safer to match the \u0027!\u0027 before the \u0027@\u0027. If an invalid config of \u0027@, !\u0027 happened to be used, this would deny all instead of allow all.","commit_id":"a518db832e7552c7eca68167b156cfd4b1c368c1"},{"author":{"_account_id":7817,"name":"Thomas Leaman","email":"thomas.leaman@hp.com","username":"bugsduggan"},"change_message_id":"277bdef0a172e6470103ef72b45e6c007780ac7c","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            if rule_exp.search(str(property_name)):"},{"line_number":171,"context_line":"                rule_roles \u003d rule.get(action)"},{"line_number":172,"context_line":"                if rule_roles:"},{"line_number":173,"context_line":"                    if \u0027@\u0027 in rule_roles:"},{"line_number":174,"context_line":"                        return True"},{"line_number":175,"context_line":"                    elif \u0027!\u0027 in rule_roles:"},{"line_number":176,"context_line":"                        return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9I74%3D","line":173,"in_reply_to":"AAAATn%2F9I9g%3D","updated":"2013-12-16 14:27:57.000000000","message":"You\u0027re right in saying that we shouldn\u0027t ever end up in a situation where this matters, I\u0027m merely being overly defensive. Having the check the other way around means that if we ever did end up in that situation, any potential damage would be mitigated.","commit_id":"a518db832e7552c7eca68167b156cfd4b1c368c1"},{"author":{"_account_id":9410,"name":"Yanis Guenane","email":"yguenane@redhat.com","username":"yguenane"},"change_message_id":"4cb9b56225c0f1555a864c17d2763b0dd4aa11fa","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            if rule_exp.search(str(property_name)):"},{"line_number":171,"context_line":"                rule_roles \u003d rule.get(action)"},{"line_number":172,"context_line":"                if rule_roles:"},{"line_number":173,"context_line":"                    if \u0027@\u0027 in rule_roles:"},{"line_number":174,"context_line":"                        return True"},{"line_number":175,"context_line":"                    elif \u0027!\u0027 in rule_roles:"},{"line_number":176,"context_line":"                        return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9I9g%3D","line":173,"in_reply_to":"AAAATn%2F9JeI%3D","updated":"2013-12-16 12:20:04.000000000","message":"With the fact that the presence of @ and ! in the same rule is checked at boot time (it wont start if it happens), the order here is irrevelant since it will never get to this part of the code if @ and ! are in the same rule","commit_id":"a518db832e7552c7eca68167b156cfd4b1c368c1"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"56f978da634f50d5dd2909409692d906c0556d88","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                        if \u0027@\u0027 in permissions and \u0027!\u0027 in permissions:"},{"line_number":111,"context_line":"                            msg \u003d _("},{"line_number":112,"context_line":"                                \"Malformed property protection rule in [%s] \""},{"line_number":113,"context_line":"                                \"%s\u003d%s: \u0027@\u0027 and \u0027!\u0027 are mutually exclusive\") \\"},{"line_number":114,"context_line":"                                % (property_exp, operation, permissions)"},{"line_number":115,"context_line":"                            LOG.error(msg)"},{"line_number":116,"context_line":"                            raise exception. \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F85EE%3D","line":113,"updated":"2013-12-19 04:21:24.000000000","message":"nit: we\u0027d better don\u0027t using \"\\\" in the code.\ni prefer use \"()\" here.","commit_id":"284a2d475acd009f5638fffd33fe4074e6196bb3"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"666603f0c09330a4044304cf6199afc97d18df33","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                        if \u0027@\u0027 in permissions and \u0027!\u0027 in permissions:"},{"line_number":111,"context_line":"                            msg \u003d _("},{"line_number":112,"context_line":"                                \"Malformed property protection rule in [%s] \""},{"line_number":113,"context_line":"                                \"%s\u003d%s: \u0027@\u0027 and \u0027!\u0027 are mutually exclusive\") \\"},{"line_number":114,"context_line":"                                % (property_exp, operation, permissions)"},{"line_number":115,"context_line":"                            LOG.error(msg)"},{"line_number":116,"context_line":"                            raise exception. \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F82mQ%3D","line":113,"in_reply_to":"AAAATn%2F85EE%3D","updated":"2013-12-19 15:18:14.000000000","message":"Agreed with Zhi. Using () would be better","commit_id":"284a2d475acd009f5638fffd33fe4074e6196bb3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"dd2c9575fbce7880cda630036e672e9770bdf93b","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                        if \u0027@\u0027 in permissions and \u0027!\u0027 in permissions:"},{"line_number":111,"context_line":"                            msg \u003d _("},{"line_number":112,"context_line":"                                \"Malformed property protection rule in [%s] \""},{"line_number":113,"context_line":"                                \"%s\u003d%s: \u0027@\u0027 and \u0027!\u0027 are mutually exclusive\") \\"},{"line_number":114,"context_line":"                                % (property_exp, operation, permissions)"},{"line_number":115,"context_line":"                            LOG.error(msg)"},{"line_number":116,"context_line":"                            raise exception. \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F82Wk%3D","line":113,"in_reply_to":"AAAATn%2F85EE%3D","updated":"2013-12-19 15:47:22.000000000","message":"I mean  http://paste.openstack.org/show/55508/","commit_id":"284a2d475acd009f5638fffd33fe4074e6196bb3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"56f978da634f50d5dd2909409692d906c0556d88","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                                \"%s\u003d%s: \u0027@\u0027 and \u0027!\u0027 are mutually exclusive\") \\"},{"line_number":114,"context_line":"                                % (property_exp, operation, permissions)"},{"line_number":115,"context_line":"                            LOG.error(msg)"},{"line_number":116,"context_line":"                            raise exception. \\"},{"line_number":117,"context_line":"                                InvalidPropertyProtectionConfiguration()"},{"line_number":118,"context_line":"                    property_dict[operation] \u003d permissions"},{"line_number":119,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F85D0%3D","line":116,"updated":"2013-12-19 04:21:24.000000000","message":"dittlo","commit_id":"284a2d475acd009f5638fffd33fe4074e6196bb3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"dd2c9575fbce7880cda630036e672e9770bdf93b","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                                \"%s\u003d%s: \u0027@\u0027 and \u0027!\u0027 are mutually exclusive\") \\"},{"line_number":114,"context_line":"                                % (property_exp, operation, permissions)"},{"line_number":115,"context_line":"                            LOG.error(msg)"},{"line_number":116,"context_line":"                            raise exception. \\"},{"line_number":117,"context_line":"                                InvalidPropertyProtectionConfiguration()"},{"line_number":118,"context_line":"                    property_dict[operation] \u003d permissions"},{"line_number":119,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F82YM%3D","line":116,"in_reply_to":"AAAATn%2F85D0%3D","updated":"2013-12-19 15:47:22.000000000","message":"humm... i mean remove \"\\\". you can do this easily:\n\nexc \u003d exception.InvalidPropertyProtectionConfiguration()\nraise exc","commit_id":"284a2d475acd009f5638fffd33fe4074e6196bb3"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"29a06d86b6b4d262180aa631033feaf69d9924d4","unresolved":false,"context_lines":[{"line_number":49,"context_line":"# NOTE (spredzy): Due to the particularly lengthy name of the exception"},{"line_number":50,"context_line":"# and the number of occurence it is raise in this file, a variable is"},{"line_number":51,"context_line":"# created"},{"line_number":52,"context_line":"InvalidPropProtectConf \u003d exception.InvalidPropertyProtectionConfiguration()"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def is_property_protection_enabled():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F8vOU%3D","line":52,"updated":"2013-12-20 21:15:01.000000000","message":"you should just set this variable equal to the exception class and instantiate a new exception when you raise it. I would prefer that so it doesn\u0027t raise redflags when another developer sees a raise without \u0027()\u0027 For example: \n\nInvalidPropProtectConf \u003d exception.InvalidPropertyProtectionConfiguration\n\nraise InvalidPropProtectConf()","commit_id":"0ce4ff5041b9e8ed59981e95c9b624a779595251"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"df5cc51a0f9566ef990c08c81e7b2780ec96e882","unresolved":false,"context_lines":[{"line_number":49,"context_line":"# NOTE (spredzy): Due to the particularly lengthy name of the exception"},{"line_number":50,"context_line":"# and the number of occurence it is raise in this file, a variable is"},{"line_number":51,"context_line":"# created"},{"line_number":52,"context_line":"InvalidPropProtectConf \u003d exception.InvalidPropertyProtectionConfiguration()"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def is_property_protection_enabled():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F8qmk%3D","line":52,"in_reply_to":"AAAATn%2F8vOU%3D","updated":"2013-12-23 14:08:46.000000000","message":"Agreed.","commit_id":"0ce4ff5041b9e8ed59981e95c9b624a779595251"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"2aeeee37b45414756932d94047c33c9ed1dd69b0","unresolved":false,"context_lines":[{"line_number":49,"context_line":"# NOTE (spredzy): Due to the particularly lengthy name of the exception"},{"line_number":50,"context_line":"# and the number of occurence it is raise in this file, a variable is"},{"line_number":51,"context_line":"# created"},{"line_number":52,"context_line":"InvalidPropProtectConf \u003d exception.InvalidPropertyProtectionConfiguration"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def is_property_protection_enabled():"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAT3%2F%2FxPo%3D","line":52,"updated":"2014-01-01 22:12:21.000000000","message":"what if we imported the exception instead?\n\nfrom glance.common.exception import InvalidPropertyProtectionConfiguration as InvalidPropProtConfig\n\nwould something like this work?","commit_id":"8a782da0d8f7be196b1a533cd55637b2a1c8ebf1"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"2aeeee37b45414756932d94047c33c9ed1dd69b0","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                                     op\u003doperation,"},{"line_number":121,"context_line":"                                     perm\u003dpermissions))"},{"line_number":122,"context_line":"                            LOG.error(msg)"},{"line_number":123,"context_line":"                            raise InvalidPropProtectConf()"},{"line_number":124,"context_line":"                    property_dict[operation] \u003d permissions"},{"line_number":125,"context_line":"                else:"},{"line_number":126,"context_line":"                    property_dict[operation] \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAT3%2F%2FxPk%3D","line":123,"updated":"2014-01-01 22:12:21.000000000","message":"can you pass the message in exception raised?","commit_id":"8a782da0d8f7be196b1a533cd55637b2a1c8ebf1"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"55ad9bd7b8922341929e179bf475c724e6f25896","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                        if \u0027@\u0027 in permissions and \u0027!\u0027 in permissions:"},{"line_number":115,"context_line":"                            msg \u003d (_("},{"line_number":116,"context_line":"                                \"Malformed property protection rule in \""},{"line_number":117,"context_line":"                                \"[%(prop)s] %(op)s\u003d%(perm)s: \u0027@\u0027 and \u0027!\u0027\""},{"line_number":118,"context_line":"                                \"are mutually exclusive\") %"},{"line_number":119,"context_line":"                                dict(prop\u003dproperty_exp,"},{"line_number":120,"context_line":"                                     op\u003doperation,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2F5LA%3D","line":117,"updated":"2014-01-07 05:59:14.000000000","message":"nit: add a space after \"!\", to make sentence correct.\n\n    \"[%(prop)s] %(op)s\u003d%(perm)s: \u0027@\u0027 and \u0027!\u0027 \"\n    \"are mutually exclusive\") %","commit_id":"1a119265e4d399d627706b30d8a905913361b764"}]}
