I was developing a DemoSite and have problem with IE7 (actually we’re only target IE8, but one of our module must run in IE8 emulate IE7 mode so a meta tag <meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ /> is put in the header). While Firefox is my primary browser and it’s OK with display: inline-block CSS style, BUT IE7 (and IE8EmulateIE7) does not render it.
EPiServer is the world’s fastest growing provider of Web Content Management (WCM) and online social community platforms. Over 3000 customers worldwide use EPiServer CMS to create collaborative, engaging and attractive websites. The platform EPiServer CMS is the foundation of more than 9000 websites and is used on a daily basis by over 130,000 web editors. It enables true web engagement which allows customers to turn passive web visits into dynamic, personalized web experiences that drive new revenues. EPiServer delivers its WCM platform through a network of more than 340 competent partner companies in 25 countries.
Founded in 1994, the company has offices in the USA, Sweden Denmark, Norway, Finland, the Netherlands, Australia, South Africa and the UK.
Bitwise operators give you the ability to store multiple settings in a single primitive data type (e.g. an integer). This is useful when a single item has potentially more than one setting of the same type.
EPiServer AccessLevel is enum, and if you want to set or remove a AccessLevel, we need to use bitwise operators:
Defining the Flags
To start of with, declare an enum to list all the possible flags. Two things are important when declaring the enum. The first thing you will probably notice is the [Flags] attribute. This is necessary in order to indicate that the enumeration should be treated as a set of flags. The second important thing is assigning a value to each of the items in the enum. The first value should be 1, then just double the value for each consecutive item. The integer type in .NET can store up to 32 flags.
// The access levels (bitmapped) that are used to control the various actions
// that a user is allowed to perform.
// Primarily used to control access to page manipulation functions in EPiServer,
// but can be used for general-purpose access restriction functions.
public enum AccessLevel
Setting flags ON:
To set multiple flags, concatenate the desired flags using the bitwise OR symbol “|”:
pageACL.Access |= AccessLevel.Delete;
Setting flags OFF:
pageACL.Access &= ~AccessLevel.Delete;
Testing to see if a certain flag is set:
Some sample code
Get a PageData by PageLink
get ACL list
Loop though ACL
Remove Delete access right, so no one can delete this page
PageData data = DataFactory.Instance.GetPage(e.PageLink);
// this page also cannot delete, ignore processing
if (data.QueryDistinctAccess(AccessLevel.Delete) == false)
// modify this page accessright, do not allow to delete
AccessControlList list = data.ACL.CreateWritableClone();
foreach (KeyValuePair<string, AccessControlEntry> pair in data.ACL)
if ((pair.Value.Access & AccessLevel.FullAccess) == AccessLevel.FullAccess)
list.Add(new AccessControlEntry(pair.Value.Name, pair.Value.Access & ~AccessLevel.FullAccess, pair.Value.EntityType));
if ((pair.Value.Access & AccessLevel.Delete) == AccessLevel.Delete)
list.Add(new AccessControlEntry(pair.Value.Name, pair.Value.Access & ~AccessLevel.Delete, pair.Value.EntityType));