public bool CanRead(Session sess, File item) { if (sess.CurrentUser == this.RootUser) { return true; } return item.CanView(sess.CurrentUser); }
public bool CanRead(Session sess, File item) { if (sess.CurrentUser == this.RootUser) { return(true); } return(item.CanView(sess.CurrentUser)); }
public void FSSetPremission(File item, UserGroup toJoin, FilePremission newPremission, Session sess) { if (item.CanView(sess.CurrentUser)) { if (item.GroupPremitions.ContainsKey(toJoin)) { item.GroupPremitions[toJoin] = newPremission; } else { item.GroupPremitions.Add(toJoin, newPremission); } } }