/* * This work is licensed under the Creative Commons Attribution 2.5 License. * To view a copy of this license, visit http://creativecommons.org/licenses/by/2.5/ * or send a letter to Creative Commons, 543 Howard Street, 5th Floor, * San Francisco, California, 94105, USA. * * Original developer: David Betz * */ using System; using System.IO; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Collections.Generic; using System.Text; using Rss; using Atom.Core; using SD.LLBLGen.Pro.ORMSupportClasses; using SD.LLBLGen.Pro.DQE.SqlServer; using DataFeedFrameworkDAL.EntityClasses; using DataFeedFrameworkDAL.FactoryClasses; using DataFeedFrameworkDAL.CollectionClasses; using DataFeedFrameworkDAL.HelperClasses; using DataFeedFrameworkDAL; using System.Security; namespace FeedBuilder { public static class FeedSecurity { internal static Boolean CheckAccessById(Int32 id) { FeedCreationEntity feed = new FeedCreationEntity(); feed.FetchUsingPK(id); if (!feed.FeedAccessViaGuidOnly) { return true; } return false; } internal static Boolean CheckAccessByTitle(String title) { FeedCreationCollection feeds = new FeedCreationCollection(); PredicateExpression filter = new PredicateExpression(); filter.Add(FeedCreationFields.FeedCreationTitle == title); feeds.GetMulti(filter); if (feeds.Count > 0) { if (!feeds[0].FeedAccessViaGuidOnly) { return true; } } return false; } } }