Beispiel #1
0
        private async Task <bool> CanDeleteCollectionAsync(Guid orgId, Guid collectionId)
        {
            if (collectionId == default)
            {
                return(false);
            }

            if (await _currentContext.DeleteAnyCollection(orgId))
            {
                return(true);
            }

            if (await _currentContext.DeleteAssignedCollections(orgId))
            {
                return(null != _collectionRepository.GetByIdAsync(collectionId, _currentContext.UserId.Value));
            }

            return(false);
        }