Security and access control breaking changes
Breaking changes to security, access control, preview tokens, and the approval engine in CMS 13.
This article covers security, access control, preview token, and content approval engine breaking changes in CMS 13.
EPiServer.Security.PrincipalInfo
- Method
HasEditAccesswas removed in favor ofuser.IsInRole(Roles.CmsEditors). - Method
IsPermittedwas removed in favor ofPermissionService.IsPermitted.
EPiServer.Security.AccessControlEntry
- Now overrides
object.Equalsandobject.GetHashCode.
EPiServer.Security.AccessControlList
- Now overrides
object.Equalsandobject.GetHashCode.
EPiServer.Security.RawACE
- Property
SIDwas removed because it is no longer used. - Public fields were changed to public properties.
EPiServer.Security.SecuritySaveType
- Values
RecursiveReplace,RecursiveModify, andModifywere removed because they are no longer used.
EPiServer.Security.SystemPermissions
- Property
WebServiceAccesswas removed because it is no longer used.
Preview tokens
Preview tokens are simplified in CMS 13. Content reference validation is no longer used:
-
EPiServer.Security.IPreviewTokenService– TheContentReferencearguments were removed because tokens are no longer issued for specific content.TryGetPreviewTokenalso requires anIPrincipalargument to determine the user for which the token is issued. -
EPiServer.Security.PreviewTokenService– Constructor argumentsIPrincipalAccessor,IContentAccessEvaluator, andIContentLoaderwere removed. -
EPiServer.Security.PreviewToken– TheContentReferenceproperty was removed. TheUserproperty is now of typeIPrincipalinstead ofIIdentity. -
EPiServer.Security.PreviewTokenContentReferenceValidation– Enum removed since content reference validation is no longer used. -
EPiServer.Security.PreviewTokenOptions– TheContentReferenceValidationproperty was removed.
Content security events
EPiServer.DataAbstraction.IContentSecurityRepository– EventsContentSecuritySaved,ContentSecuritySaving, andContentSecurityDeletedwere removed in favor of events on theEPiServer.DataAbstraction.IContentSecurityEventsinterface.
Approval engine
-
IApprovalEngine– Now throwsArgumentOutOfRangeExceptionrather thanIndexOutOfRangeExceptionifstepIndexis outside the step index. -
IApprovalEngine– The API requiresAdministeraccess rights to transition a content version fromAwaitingApproval(unlessIContentRepository.Saveis called withAccessLevel.NoAccess). -
IApprovalEngine– Content under an approval definition must go through the approval workflow before publishing. Publishing such content throws aValidationException. To bypass this validation usingSaveAction.SkipValidation, the user must haveAdministeraccess rights (unlessIContentRepository.Saveis called withAccessLevel.NoAccess). -
EPiServer.Approvals.ApprovalStepEventHandler– Delegate was removed in favor ofEPiServer.Approvals.IApprovalEngineEvents. -
EPiServer.Approvals.IApprovalTypeRegistry– A new methodUnregisterwas added to the interface.
Permission repository
EPiServer.DataAbstraction.PermissionRepository– MethodsGetPermissions,SavePermissions,DeletePermissionswere removed in favor of corresponding asynchronous methods.
Updated 9 days ago
