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