public override IList <AccountAuditEntry> CreateAccountAuditEntries(ISession session, ManagedSecurityContext sec, DataOperation op) { List <AccountAuditEntry> result = new List <AccountAuditEntry>(); switch (op) { case DataOperation.Create: result.Add(ManagedAccountAuditEntry.CreatePublicAccountAuditEntry(session, mInstance.Account, string.Format("[user:{0}] and [user:{1}] are now friends", mInstance.Keen.Id, mInstance.Account.Id), string.Format("AccountView.aspx?id={0}", mInstance.Keen.Id))); result.Add(ManagedAccountAuditEntry.CreatePublicAccountAuditEntry(session, mInstance.Keen, string.Format("[user:{0}] and [user:{1}] are now friends", mInstance.Account.Id, mInstance.Keen.Id), string.Format("AccountView.aspx?id={0}", mInstance.Keen.Id))); break; case DataOperation.Delete: result.Add(ManagedAccountAuditEntry.CreateSystemAccountAuditEntry(session, mInstance.Account, string.Format("[user:{0}] and [user:{1}] are no longer friends", mInstance.Keen.Id, mInstance.Account.Id), string.Format("AccountView.aspx?id={0}", mInstance.Keen.Id))); result.Add(ManagedAccountAuditEntry.CreateSystemAccountAuditEntry(session, mInstance.Keen, string.Format("[user:{0}] and [user:{1}] are no longer friends", mInstance.Account.Id, mInstance.Keen.Id), string.Format("AccountView.aspx?id={0}", mInstance.Keen.Id))); break; } return(result); }
public AccountAuditEntry GetPublicAccountAuditEntry(ISession session, ManagedSecurityContext sec) { string url = string.Format("DiscussionThreadView.aspx?id={0}&did={1}", mInstance.DiscussionThread.Id, mInstance.DiscussionThread.Discussion.Id); AccountAuditEntry audit_entry = ManagedAccountAuditEntry.CreatePublicAccountAuditEntry(session, sec.Account, string.Format("[user:{0}] posted <a href=\"{1}\">{2}</a> in [discussion:{3}]", mInstance.AccountId, url, Renderer.Render(mInstance.Subject), mInstance.DiscussionThread.Discussion.Id), url); return(audit_entry); }
public IEnumerable <AccountAuditEntry> GetAccountAuditEntries(ISession session, Account account, string url) { IList <string> result_strings = GetAccountAuditStrings(); List <AccountAuditEntry> result = new List <AccountAuditEntry>(result_strings.Count); foreach (string s in result_strings) { AccountAuditEntry entry = ManagedAccountAuditEntry.CreatePublicAccountAuditEntry( session, account, s, url); result.Add(entry); } return(result); }
public override IList <AccountAuditEntry> CreateAccountAuditEntries(ISession session, ManagedSecurityContext sec, DataOperation op) { List <AccountAuditEntry> result = new List <AccountAuditEntry>(); switch (op) { case DataOperation.Create: result.Add(ManagedAccountAuditEntry.CreatePublicAccountAuditEntry(session, sec.Account, string.Format("[user:{0}] added [place:{1}] to [group:{2}]", sec.Account.Id, mInstance.Place.Id, mInstance.AccountGroup.Id), string.Format("AccountGroupView.aspx?id={0}", mInstance.AccountGroup.Id))); break; } return(result); }
public override IList <AccountAuditEntry> CreateAccountAuditEntries(ISession session, ManagedSecurityContext sec, DataOperation op) { List <AccountAuditEntry> result = new List <AccountAuditEntry>(); switch (op) { case DataOperation.Create: result.Add(ManagedAccountAuditEntry.CreatePublicAccountAuditEntry(session, sec.Account, string.Format("[user:{0}] posted a new mad lib in [{1}:{2}]", mInstance.AccountId, mInstance.DataObject.Name.ToLower(), mInstance.ObjectId), string.Format("{0}View.aspx?id={1}", mInstance.DataObject.Name, mInstance.ObjectId))); break; } return(result); }
public override IList <AccountAuditEntry> CreateAccountAuditEntries(ISession session, ManagedSecurityContext sec, DataOperation op) { List <AccountAuditEntry> result = new List <AccountAuditEntry>(); switch (op) { case DataOperation.Create: result.Add(ManagedAccountAuditEntry.CreatePublicAccountAuditEntry(session, mInstance.Account, string.Format("[user:{0}] started a new blog: [blog:{1}]", mInstance.Account.Id, mInstance.Id), string.Format("AccountBlogView.aspx?id={0}", mInstance.Id))); break; } return(result); }
public override IList <AccountAuditEntry> CreateAccountAuditEntries(ISession session, ManagedSecurityContext sec, DataOperation op) { switch (op) { case DataOperation.Create: List <AccountAuditEntry> result = new List <AccountAuditEntry>(); result.Add(ManagedAccountAuditEntry.CreatePublicAccountAuditEntry(session, mInstance.Account, string.Format("[user:{0}] uploaded a new picture", mInstance.Account.Id, mInstance.Id), string.Format("AccountPictureView.aspx?id={0}", mInstance.Id))); return(result); default: return(null); } }
public override IList <AccountAuditEntry> CreateAccountAuditEntries(ISession session, ManagedSecurityContext sec, DataOperation op) { List <AccountAuditEntry> result = new List <AccountAuditEntry>(); switch (op) { case DataOperation.Create: string url = string.Format("AccountBlogPostView.aspx?id={0}", mInstance.Id); result.Add(ManagedAccountAuditEntry.CreatePublicAccountAuditEntry(session, mInstance.AccountBlog.Account, string.Format("[user:{0}] posted <a href=\"{1}\">{2}</a> in [blog:{3}]", mInstance.AccountBlog.Account.Id, url, Renderer.Render(mInstance.Title), mInstance.AccountBlog.Id), url)); break; } return(result); }
public override IList <AccountAuditEntry> CreateAccountAuditEntries(ISession session, ManagedSecurityContext sec, DataOperation op) { switch (op) { case DataOperation.Create: List <AccountAuditEntry> result = new List <AccountAuditEntry>(); result.Add(ManagedAccountAuditEntry.CreatePublicAccountAuditEntry(session, mInstance.Account, string.Format("[user:{0}] added [place:{1}]{2}", mInstance.Account.Id, mInstance.Id, mInstance.City == null ? string.Empty : string.Format(" in {0}", mInstance.City.Name)), string.Format("PlaceView.aspx?id={0}", mInstance.Id))); return(result); default: return(null); } }