public virtual ISecureObject GetSecureObjectByUniqueName(string uniqueName, bool includeChildren = true, bool includeDisabled = false) { SecureObject found = Store.SecureObjects.FindRecursive <SecureObject>(o => o.UniqueName.Equals(uniqueName, StringComparison.OrdinalIgnoreCase) && (o.IsEnabled || includeDisabled)); if (found != null && !includeChildren) { found = found.Clone(shallow: false); } return(found); }
public virtual ISecureObject GetSecureObjectByUId(Guid secureObjectUId, bool includeChildren = false, bool includeDisabled = false) { SecureObject found = Store.SecureObjects.FindRecursive <SecureObject>(o => o.UId == secureObjectUId && (o.IsEnabled || includeDisabled)); if (found != null && !includeChildren) { found = found.Clone(shallow: false); } return(found); }