/** * Returns <code>true</code> if this is an exclusive, temporary exclusive, or * directly inherited lock, and the given user is the owner of this lock.<p> * * @param user the user to compare to the owner of this lock * * @return <code>true</code> if this is an exclusive, temporary exclusive, or * directly inherited lock, and the given user is the owner of this lock */ public boolean isDirectlyOwnedBy(CmsUser user) { return (isExclusive() || isDirectlyInherited()) && isOwnedBy(user); }
/** * Returns <code>true</code> if this is an exclusive, temporary exclusive, or * directly inherited lock, and the given user is the owner of this lock, * checking also the project of the lock.<p> * * @param user the user to compare to the owner of this lock * @param project the project to compare to the project of this lock * * @return <code>true</code> if this is an exclusive, temporary exclusive, or * directly inherited lock, and the given user is the owner of this lock */ public boolean isDirectlyOwnedInProjectBy(CmsUser user, CmsProject project) { return (isExclusive() || isDirectlyInherited()) && isOwnedInProjectBy(user, project); }
/** * Returns <code>true</code> if this is an exclusive, temporary exclusive, or * directly inherited lock, and the current user is the owner of this lock, * checking also the project of the lock.<p> * * @param cms the CMS context to check * * @return <code>true</code> if this is an exclusive, temporary exclusive, or * directly inherited lock, and the current user is the owner of this lock */ public boolean isDirectlyOwnedInProjectBy(CmsObject cms) { return (isExclusive() || isDirectlyInherited()) && isOwnedInProjectBy( cms.getRequestContext().getCurrentUser(), cms.getRequestContext().getCurrentProject()); }
|| (lock.isDirectlyInherited() && lock.isOwnedBy(getCms().getRequestContext().currentUser()))) {
if (currentLock.getEditionLock().isDirectlyInherited()) {
if (currentLock.getEditionLock().isDirectlyInherited()) {