Returns if direct edit is enabled.<p>

@param cms the current cms context

@return <code>true</code> if direct edit is enabled
774443
static boolean isDirectEditEnabled(CmsObject cms) {

        return !cms.getRequestContext().getCurrentProject().isOnlineProject()
            && (cms.getRequestContext().getAttribute(CmsGwtConstants.PARAM_DISABLE_DIRECT_EDIT) == null);
    }
3382
private boolean checkLock(CmsResource resource) throws CmsException {

        CmsLock lock = m_cms.getLock(resource);
        return lock.isUnlocked() || lock.getUserId().equals(m_cms.getRequestContext().getCurrentUser().getId());
    }
332400
@Override
    protected boolean performDialogOperation() throws CmsException {

        // check if the current resource is a folder for single operation
        boolean isFolder = isOperationOnFolder();
        // on folder undo changes or multi operation display "please wait" screen, not for simple file undo changes
        if ((isMultiOperation() || isFolder) && !DIALOG_WAIT.equals(getParamAction())) {
            // return false, this will trigger the "please wait" screen
            return false;
        }

        // get the flag if the undo changes is recursive from request parameter
        boolean undoRecursive = Boolean.valueOf(getParamRecursive()).booleanValue();
        boolean undoMove = Boolean.valueOf(getParamMove()).booleanValue();

        CmsResourceUndoMode mode = CmsResource.UNDO_CONTENT;
        if (undoRecursive) {
            mode = CmsResource.UNDO_CONTENT_RECURSIVE;
        }
        if (undoMove) {
            mode = mode.includeMove();
        }

        Iterator<String> i = getResourceList().iterator();
        // iterate the resources to delete
        while (i.hasNext()) {
            String resName = i.next();
            try {
                // lock resource if autolock is enabled
                checkLock(resName);
                // undo changes on the resource
                getCms().undoChanges(resName, mode);
            } catch (CmsException e) {
                if (isMultiOperation()) {
                    // collect exceptions to create a detailed output
                    addMultiOperationException(e);
                } else {
                    // for single operation, throw the exception immediately
                    throw e;
                }
            }
        }
        // check if exceptions occurred
        checkMultiOperationException(Messages.get(), Messages.ERR_UNDO_CHANGES_MULTI_0);

        return true;
    }
1340886
public boolean hasSubOUs() throws CmsException {

        List<CmsOrganizationalUnit> orgUnits = OpenCms.getOrgUnitManager().getOrganizationalUnits(
            getCms(),
            m_paramOufqn,
            true);
        if (orgUnits == null) {
            return false;
        }
        if (orgUnits.size() < 1) {
            return false;
        }
        return true;
    }
575828
public void disableEditing(String reason) {

        CmsContainerpageController.get().reinitializeButtons();
        m_add.disable(reason);
        m_clipboard.disable(reason);
    }
557041
public static boolean updatingIndexNecessesary(CmsObject cms) {

        // Set request to the offline project.
        setCmsOfflineProject(cms);

        // Check whether the spellcheck index directories are empty.
        // If they are, the index has to be built obviously.
        if (isSolrSpellcheckIndexDirectoryEmpty()) {
            return true;
        }

        // Compare the most recent date of a dictionary with the oldest timestamp
        // that determines when an index has been built.
        long dateMostRecentDictionary = getMostRecentDate(cms);
        long dateOldestIndexWrite = getOldestIndexDate(cms);

        return dateMostRecentDictionary > dateOldestIndexWrite;
    }
1294971
public static void updateDirectEditFlagInSession(ServletRequest request) {

        String disabledParam = request.getParameter(CmsGwtConstants.PARAM_DISABLE_DIRECT_EDIT);
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(disabledParam)) {
            if (Boolean.parseBoolean(disabledParam)) {
                ((HttpServletRequest)request).getSession().setAttribute(
                    CmsGwtConstants.PARAM_DISABLE_DIRECT_EDIT,
                    Boolean.TRUE);
                String buttonLeft = request.getParameter(CmsGwtConstants.PARAM_BUTTON_LEFT);
                if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(buttonLeft)) {
                    Integer left = null;
                    try {
                        left = Integer.valueOf(buttonLeft);
                        if (left.intValue() > 0) {
                            ((HttpServletRequest)request).getSession().setAttribute(
                                CmsGwtConstants.PARAM_BUTTON_LEFT,
                                left);
                        }
                    } catch (NumberFormatException e) {
                        // malformed parameter, ignore
                    }
                }
            } else {
                ((HttpServletRequest)request).getSession().removeAttribute(CmsGwtConstants.PARAM_DISABLE_DIRECT_EDIT);
            }
        }
    }
120141
boolean isPossiblyDetailContent(CmsResource resource) {

        if (CmsResourceTypeXmlContainerPage.isContainerPage(resource)) {
            return false;
        }
        I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(resource);
        if (type instanceof CmsResourceTypeXmlAdeConfiguration) {
            return false;
        }
        return true;
    }
352053
protected boolean performDialogOperation() throws CmsException {

        // lock the folder
        checkLock(getParamResource());

        Iterator<CmsResource> i = getResources().iterator();
        // loop over all image resources to change the properties
        CmsResource res;
        while (i.hasNext()) {
            res = i.next();
            String imageName = res.getName();
            String propertySuffix = "" + imageName.hashCode();

            String property;
            I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(res);
            CmsExplorerTypeSettings settings = getSettingsForType(type.getTypeName());
            Iterator<String> itProperties = settings.getProperties().iterator();
            while (itProperties.hasNext()) {
                property = itProperties.next();
                CmsProperty currProperty = getCms().readPropertyObject(res, property, false);
                String newValue = getJsp().getRequest().getParameter(property + propertySuffix);
                writeProperty(res, property, newValue, currProperty);
            }
        }

        // unlock the folder
        CmsObject cms = getCms();
        cms.unlockResource(getParamResource());
        return true;
    }
227769
public boolean isEditorAvailableForResource(CmsResource res) {

        I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(res);
        String typeName = type.getTypeName();
        for (CmsWorkplaceEditorConfiguration editorConfig : m_editorConfigurations) {
            if (editorConfig.matchesResourceType(typeName)) {
                return true;
            }
        }
        return false;
    }
787077
public boolean canLockBecauseOfInactivity(CmsObject cms, CmsUser user) {

        return !user.isManaged()
            && !user.isWebuser()
            && !OpenCms.getDefaultUsers().isDefaultUser(user.getName())
            && !OpenCms.getRoleManager().hasRole(cms, user.getName(), CmsRole.ROOT_ADMIN);
    }
676343
public void enableFavoriteEditing(boolean enable, I_CmsDNDController dndController) {

        if (m_dndHandler.isDragging()) {
            // never switch drag and drop controllers while dragging
            return;
        }
        if (enable) {
            m_dndHandler.setController(dndController);
        } else {
            m_dndHandler.setController(m_cntDndController);
        }

    }
1194595
static public function isEditor($request)
    {
        if (! User_Precondition::isLogedIn($request)){
            return false;
        }
        if ($request->user->hasPerm('tenant.owner') || $request->user->hasPerm('cms.editor')) {
            return true;
        }
        return false;
    }
375400
protected boolean hasChangedEditables() {

        if (m_editables == null) {
            return true;
        }
        for (CmsListCollectorEditor editor : m_editables.values()) {
            if (!editor.isValid()) {
                return true;
            }
        }
        return getEditableElements().size() > m_editables.size();
    }
399286
public static boolean isSystemActionsEnabled() {
		final String parameter = Parameter.SYSTEM_ACTIONS_ENABLED.getValue();
		return parameter == null || Boolean.parseBoolean(parameter);
	}
617387
public boolean isDetailPage(CmsObject cms, CmsResource resource) {

        try {
            boolean result = m_detailPageIdCache.get(resource).booleanValue();
            if (!result) {
                // We want new detail pages to be available fast, so we don't cache negative results
                m_detailPageIdCache.invalidate(resource);
            }
            return result;
        } catch (ExecutionException e) {
            LOG.error(e.getLocalizedMessage(), e);
            return true;
        }
    }
402833
public static boolean isEditable(Element element) {

        String field = element.getAttribute(CmsGwtConstants.ATTR_DATA_FIELD);
        return (field != null) && field.contains("opencms://");
    }