View Source
Class PublicAccessService
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public class PublicAccessService : ScopeRepositoryService, IPublicAccessService, IService
Constructors
View Source
PublicAccessService(IScopeProvider, ILogger, IEventMessagesFactory, IPublicAccessRepository)
Declaration
public PublicAccessService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IPublicAccessRepository publicAccessRepository)
Parameters
Methods
View Source
AddRule(IContent, String, String)
Declaration
public Attempt<OperationResult<OperationResultType, PublicAccessEntry>> AddRule(IContent content, string ruleType, string ruleValue)
Parameters
Type |
Name |
Description |
IContent |
content |
|
System.String |
ruleType |
|
System.String |
ruleValue |
|
Returns
View Source
Delete(PublicAccessEntry)
Deletes the entry and all associated rules
Declaration
public Attempt<OperationResult> Delete(PublicAccessEntry entry)
Parameters
Returns
View Source
GetAll()
Gets all defined entries and associated rules
Declaration
public IEnumerable<PublicAccessEntry> GetAll()
Returns
View Source
GetEntryForContent(String)
Gets the entry defined for the content item based on a content path
Declaration
public PublicAccessEntry GetEntryForContent(string contentPath)
Parameters
Type |
Name |
Description |
System.String |
contentPath |
|
Returns
View Source
GetEntryForContent(IContent)
Gets the entry defined for the content item's path
Declaration
public PublicAccessEntry GetEntryForContent(IContent content)
Parameters
Returns
View Source
IsProtected(String)
Returns true if the content has an entry based on a content path
Declaration
public Attempt<PublicAccessEntry> IsProtected(string contentPath)
Parameters
Type |
Name |
Description |
System.String |
contentPath |
|
Returns
View Source
IsProtected(IContent)
Returns true if the content has an entry for it's path
Declaration
public Attempt<PublicAccessEntry> IsProtected(IContent content)
Parameters
Returns
View Source
RemoveRule(IContent, String, String)
Declaration
public Attempt<OperationResult> RemoveRule(IContent content, string ruleType, string ruleValue)
Parameters
Type |
Name |
Description |
IContent |
content |
|
System.String |
ruleType |
|
System.String |
ruleValue |
|
Returns
View Source
Save(PublicAccessEntry)
Declaration
public Attempt<OperationResult> Save(PublicAccessEntry entry)
Parameters
Returns
Events
View Source
Deleted
Declaration
public static event TypedEventHandler<IPublicAccessService, DeleteEventArgs<PublicAccessEntry>> Deleted
Event Type
View Source
Deleting
Declaration
public static event TypedEventHandler<IPublicAccessService, DeleteEventArgs<PublicAccessEntry>> Deleting
Event Type
View Source
Saved
Declaration
public static event TypedEventHandler<IPublicAccessService, SaveEventArgs<PublicAccessEntry>> Saved
Event Type
View Source
Saving
Declaration
public static event TypedEventHandler<IPublicAccessService, SaveEventArgs<PublicAccessEntry>> Saving
Event Type