public override ACL GetACL(Type type) { ACL acl = base.GetACL(type); acl.Add(new ACLEveryoneAllowRetrieve()); acl.Add(new ACLAuthenticatedAllowCreate()); // website owner can delete/edit his own addition acl.Add(new ACLAccount(mInstance.Account, DataOperation.All)); // place owners have the same rights to linked websites acl.AddRange(new ManagedPlace(Session, mInstance.Place).GetACL(type).AccessControlList); return(acl); }
/// <summary> /// all-admin ACL /// </summary> /// <param name="sec"></param> /// <returns></returns> public static ACL GetAdministrativeACL(ISession session) { lock (s_AdminACL) { if (s_AdminACL.Count == 0) { IList <Account> admins = session.CreateCriteria(typeof(Account)).Add(Expression.Eq("IsAdministrator", true)).List <Account>(); s_AdminACL.AddRange(ACLAccountId.GetACLEntries(admins, (int)DataOperation.All, DataOperationPermission.Allow)); } } ACL acl = new ACL(s_AdminACL); return(acl); }