Carrotware.CMS.Core.ContentSnippet.IsSnippetLocked C# (CSharp) Method

IsSnippetLocked() public method

public IsSnippetLocked ( System.Guid currentUserID ) : bool
currentUserID System.Guid
return bool
        public bool IsSnippetLocked(Guid currentUserID)
        {
            bool bLock = false;
            if (this.Heartbeat_UserId != null) {
                if (this.Heartbeat_UserId != currentUserID
                        && this.EditHeartbeat.Value > DateTime.UtcNow.AddMinutes(-2)) {
                    bLock = true;
                }
                if (this.Heartbeat_UserId == currentUserID
                    || this.Heartbeat_UserId == null) {
                    bLock = false;
                }
            }
            return bLock;
        }