public static bool CanEdit(Cases cases)
 {
     return(IsAdmin || cases.CreateBy == SecurityContext.CurrentAccount.ID ||
            !CRMSecurity.IsPrivate(cases) || GetAccessSubjectTo(cases).ContainsKey(SecurityContext.CurrentAccount.ID));
 }
 public static bool CanEdit(Deal deal)
 {
     return(IsAdmin || deal.ResponsibleID == SecurityContext.CurrentAccount.ID || deal.CreateBy == SecurityContext.CurrentAccount.ID ||
            !CRMSecurity.IsPrivate(deal) || GetAccessSubjectTo(deal).ContainsKey(SecurityContext.CurrentAccount.ID));
 }