from ploneintranet.attachments.attachments import IAttachmentStoragable
from ploneintranet.workspace.interfaces import IVisibleToIntranetUsersWorkspace
from ploneintranet.workspace.workspacefolder import IWorkspaceFolder
from ploneintranet.workspace.workspacefolder import WorkspaceFolder
from zope.interface import implementer


class ISuperspaceFolder(
    IWorkspaceFolder, IAttachmentStoragable, IVisibleToIntranetUsersWorkspace
):
    """
    Interface for superspaces
    """


@implementer(ISuperspaceFolder)
class SuperspaceFolder(WorkspaceFolder):
    """
    A superspace
    """

    # XXX: This has to be simplified once we do not inherit anymore
    # from WorkspaceFolder (see #2652)
    _superspace_roles = [
        "Contributor",
        "Reader",
        "TeamMember",
    ]

    ws_type = "super"
    # XXX: this should go away once we do not inherit anymore
    # from WorkspaceFolder (see #2652)
    accessible_to_intranet_users = True
    visible_to_intranet_users = True
