(sketch)
return jsonify(
            {
                'objects': [sketch_fields],
                'meta': meta
            }
        )
Returns a limited sketch view for administrators.

        An administrator needs to get information about all sketches
        that are stored on the backend. However that view should be
        limited for sketches that user does not have explicit read
        or other permissions as well. In those cases the returned
        sketch only contains information about the name, description,
        etc but not any information about the data, nor any access
        to the underlying data of the sketch.

        Args:
            sketch: a sketch object (instance of models.Sketch)

        Returns:
            A limited view of a sketch in JSON (instance of
            flask.wrappers.Response)
Returns a limited sketch view for administrators.
Returns a limited sketch view for administrators .
def _get_sketch_for_admin(sketch):
        """Returns a limited sketch view for administrators.

        An administrator needs to get information about all sketches
        that are stored on the backend. However that view should be
        limited for sketches that user does not have explicit read
        or other permissions as well. In those cases the returned
        sketch only contains information about the name, description,
        etc but not any information about the data, nor any access
        to the underlying data of the sketch.

        Args:
            sketch: a sketch object (instance of models.Sketch)

        Returns:
            A limited view of a sketch in JSON (instance of
            flask.wrappers.Response)
        """
        if sketch.get_status.status == 'archived':
            status = 'archived'
        else:
            status = 'admin_view'

        sketch_fields = {
            'id': sketch.id,
            'name': sketch.name,
            'description': sketch.description,
            'user': {'username': current_user.username},
            'timelines': [],
            'stories': [],
            'active_timelines': [],
            'label_string': sketch.label_string,
            'status': [{
                'id': 0,
                'status': status}],
            'all_permissions': sketch.all_permissions,
            'created_at': sketch.created_at,
            'updated_at': sketch.updated_at,
        }

        meta = {
            'current_user': current_user.username,
            'last_activity': utils.get_sketch_last_activity(sketch),
        }
        return jsonify(
            {
                'objects': [sketch_fields],
                'meta': meta
            }
        )
def _get_sketch_for_admin ( sketch ) : if sketch . get_status . status == 'archived' : status = 'archived' else : status = 'admin_view' sketch_fields = { 'id' : sketch . id , 'name' : sketch . name , 'description' : sketch . description , 'user' : { 'username' : current_user . username } , 'timelines' : [ ] , 'stories' : [ ] , 'active_timelines' : [ ] , 'label_string' : sketch . label_string , 'status' : [ { 'id' : 0 , 'status' : status } ] , 'all_permissions' : sketch . all_permissions , 'created_at' : sketch . created_at , 'updated_at' : sketch . updated_at , } meta = { 'current_user' : current_user . username , 'last_activity' : utils . get_sketch_last_activity ( sketch ) , } return jsonify ( { 'objects' : [ sketch_fields ] , 'meta' : meta } )