Пример #1
0
 public bool CanRead(Session sess, File item)
 {
     if (sess.CurrentUser == this.RootUser)
     {
         return true;
     }
     return item.CanView(sess.CurrentUser);
 }
Пример #2
0
 public bool CanRead(Session sess, File item)
 {
     if (sess.CurrentUser == this.RootUser)
     {
         return(true);
     }
     return(item.CanView(sess.CurrentUser));
 }
Пример #3
0
 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);
         }
     }
 }
Пример #4
0
 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);
         }
     }
 }