# Path: cms/dbutil.py
# def get_mongodb(request):
# def get_collection(request, name):
# def get_gridfs(request, collection='fs'):
# def encode_keys(d):
# def get_es_conn(request):
# def get_es_index_name(request):
# def serve_gridfs_file(file):
# def serve_gridfs_file_for_id(request, id, collection='fs'):


from folder import Folder
from article import Article
from pyramid import security
from bson.objectid import ObjectId
from cms import dbutil
from users import UserCollection, GroupCollection, User, generate_random_password
from trash import Trash
import permissions
import pyes



class Root(Folder):
    
    _object_type = 'root'

    RESERVED_NAMES = Folder.RESERVED_NAMES + ('users', 'groups', 'trash', 'login', 'logout', 'my_password')

    # Map Content _object_type strings to their classes.
    # This should contain all types that a CMS user could possibly create.
    _content_type_factories = {
        'folder': Folder,
        'article': Article,
    }

    def __init__(self, request, **kwargs):
        Folder.__init__(self, request, **kwargs)

# Path: cms/dbutil.py
# def get_mongodb(request):
# def get_collection(request, name):
# def get_gridfs(request, collection='fs'):
# def encode_keys(d):
# def get_es_conn(request):
# def get_es_index_name(request):
# def serve_gridfs_file(file):
# def serve_gridfs_file_for_id(request, id, collection='fs'):


# Path: cms/resources/root.py
from folder import Folder
from article import Article
from pyramid import security
from bson.objectid import ObjectId
from cms import dbutil
from users import UserCollection, GroupCollection, User, generate_random_password
from trash import Trash
import permissions
import pyes




class Root(Folder):
    
    _object_type = 'root'

    RESERVED_NAMES = Folder.RESERVED_NAMES + ('users', 'groups', 'trash', 'login', 'logout', 'my_password')

    # Map Content _object_type strings to their classes.
    # This should contain all types that a CMS user could possibly create.
    _content_type_factories = {
        'folder': Folder,
        'article': Article,
    }

    def __init__(self, request, **kwargs):
        Folder.__init__(self, request, **kwargs)

        self.__name__ = ''