protected void DeleteFile(object sender, CommandEventArgs e) { WikiFile wf = new WikiFile(int.Parse(e.CommandArgument.ToString())); //Member mem = Member.GetCurrentMember(); //if (wf.CreatedBy == mem.Id) wf.Delete(); RebindFiles(); }
protected void DeleteFile(object sender, CommandEventArgs e) { WikiFile wf = new WikiFile(int.Parse(e.CommandArgument.ToString())); Member mem = Member.GetCurrentMember(); if (wf.CreatedBy == mem.Id || Utils.IsProjectContributor(mem.Id, pageId)) { wf.Delete(); } RebindFiles(); }
public void Remove(WikiFile file) { file.Delete(); }