private void UpdateAccess(FunctionTypeAttribute functionTypeAttribute, WrappedPageType functionType) { AccessTimer.Start(); int functionTypeID = functionType.ID; var functionAccessControlList = ManageAccessHandler.GetACLOfFunctionType(functionTypeID); ContentFunctionType.Load(functionTypeID); var defaultAccessControlList = ManageAccessHandler.LoadDefaultAccessFunctionType(); bool chanaged = false; foreach (var accessEntry in defaultAccessControlList.Where(a => functionAccessControlList.Exists(a.Key) == false).ToList()) { functionAccessControlList.Add(accessEntry.Value); chanaged = true; } if (chanaged) { ManageAccessHandler.SaveAccessFunctionType(functionAccessControlList, null, functionTypeID); Logger.DebugFormat("UpdateAccess for {0}", functionTypeID); } AccessTimer.Stop(); }
private void UpdateAccess(FunctionTypeAttribute functionTypeAttribute, PageType functionType) { int functionTypeID = functionType.ID; var functionAccessControlList = ManageAccessHandler.GetACLOfFunctionType(functionTypeID); ContentFunctionType.Load(functionTypeID); var defaultAccessControlList = ManageAccessHandler.LoadDefaultAccessFunctionType(); foreach (var accessEntry in defaultAccessControlList.Where(a => functionAccessControlList.Exists(a.Key) == false).ToList()) { functionAccessControlList.Add(accessEntry.Value); } ManageAccessHandler.SaveAccessFunctionType(functionAccessControlList, null, functionTypeID); }
public static void SetDefaultAccessPageType(int pageTypeID) { ManageAccessHandler.SaveAccessPageType(ManageAccessHandler.LoadDefaultAccessPageType(), new AccessControlList(), pageTypeID); }