IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
Decorators are a way of sharing implementation across multiple data providers. Sitefinity CMS has a built-in decorator for OpenAccess. Unless you have a reason not to use OpenAccess, you won't have to worry about implementing the methods that are mentioned in this topic.
Information in this topic will be useful for provider implementors, as the decorator methods are usually implementing provider methods. This usually happens like this:
public
virtual
Permission CreatePermission(
string
permissionSet, Guid objectId, Guid principalId)
{
if
(
this
.providerDecorator !=
null
)
return
.providerDecorator.CreatePermission(permissionSet, objectId, principalId);
throw
new
MissingDecoratorException(
,
"CreatePermission<TPermission>(string permissionSet, Guid objectId, Guid principalId)"
);
}
Executes permission inheritance between a parent and a child hierarchical secured objects. The algorithm is as follows:
bool
isChild =
!parent
.PermissionChildren
.Any(p => p.ObjectId == parent.Id &&
p.ChildObjectId == child.Id
void
CreatePermissionInheritanceAssociation(ISecuredObject parent, ISecuredObject child)
Adds a permission to a secured object, and handles inheritance throughout the tree. Implementation follows these steps:
AddPermissionToObject(ISecuredObject securedObject, Permission permission,
tranName)
AddPermissionToObject(ISecuredObject securedObject, IManager managerInstance, Permission permission,
Get or create the security root. If security root is to be created, one can specify labeling information and/or supported permission sets.
SecurityRoot GetSecurityRoot()
SecurityRoot GetSecurityRoot(
create)
create, IDictionary<
> permissionsetObjectTitleResKeys,
params
[] permissionSets)
Every permission contains information about inheritance. Part of that information is the permission's child object type. If one wanted to shorten that name so that less information is stored in database, this would be the method that returns a CLR type from the shortened CLR type name string.
Type ConvertVoaClassToClrType(
voaClassName)
Every permission contains information about inheritance. Part of that information is the permission's child object type. If one wanted to shorten that name so that less information is stored in database, this would be the method that creates a shortened type name using a CLR type.
ConvertClrTypeVoaClass(Type ClrType)
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important