コード例 #1
0
ファイル: s3_acl.py プロジェクト: sivakrishnan47/swift3
    def GET(self, req):
        """
        Handles GET Bucket acl and GET Object acl.
        """
        resp = req.get_response(self.app)
        acl = getattr(resp, "%s_acl" % ("object" if req.is_object_request else "bucket"))

        resp = HTTPOk()
        resp.body = tostring(acl.elem())

        return resp
コード例 #2
0
    def GET(self, req):
        """
        Handles GET Bucket acl and GET Object acl.
        """
        resp = req.get_response(self.app)

        acl = resp.object_acl if req.is_object_request else resp.bucket_acl

        resp = HTTPOk()
        resp.body = tostring(acl.elem())

        return resp
コード例 #3
0
    def GET(self, req):
        """
        Handles GET Bucket acl and GET Object acl.
        """
        resp = req.get_response(self.app, 'HEAD', permission='READ_ACP')
        acl = getattr(resp, '%s_acl' %
                      ('object' if req.is_object_request else 'bucket'))

        resp = HTTPOk()
        resp.body = tostring(acl.elem())

        return resp
コード例 #4
0
    def GET(self, req):
        """
        Handles GET Bucket acl and GET Object acl.
        """
        resp = req.get_response(self.app, 'HEAD', permission='READ_ACP')
        acl = getattr(
            resp, '%s_acl' % ('object' if req.is_object_request else 'bucket'))

        resp = HTTPOk()
        resp.body = tostring(acl.elem())

        return resp
コード例 #5
0
ファイル: s3_acl.py プロジェクト: notmyname/swift3
    def GET(self, req):
        """
        Handles GET Bucket acl and GET Object acl.
        """
        resp = req.get_response(self.app)

        acl = resp.object_acl if req.is_object_request else resp.bucket_acl

        resp = HTTPOk()
        resp.body = tostring(acl.elem())

        return resp