Example #1
0
        protected override void PostCreateInsideTransaction(BusinessContext context)
        {
            base.PostCreateInsideTransaction(context);

            // Add SecureRole To Principal
            DirectoryManager.CreatePrincipal(DirectoryPrincipalType.SecureRole,
                                             ((CreateResponse)context.Response).PrimaryKeyId,
                                             ((DirectorySecureRoleEntity)context.Request.Target).Name);
        }
        protected override void PostCreateInsideTransaction(BusinessContext context)
        {
            base.PostCreateInsideTransaction(context);

            // Add BusinessUnit To Principal
            DirectoryManager.CreatePrincipal(DirectoryPrincipalType.OrganizationalUnit,
                                             ((CreateResponse)context.Response).PrimaryKeyId,
                                             ((DirectoryOrganizationalUnitEntity)context.Request.Target).Name);

            // Add BusinessUnitScope To Principal
            DirectoryManager.CreatePrincipal(DirectoryPrincipalType.OrganizationalUnitScope,
                                             (PrimaryKeyId)((DirectoryOrganizationalUnitEntity)context.Request.Target).OrganizationalUnitScopeId,
                                             ((DirectoryOrganizationalUnitEntity)context.Request.Target).Name);
        }