コード例 #1
0
 public IEnumerable <AuthorityType> GetAuthorities(long userid)
 {
     if (TimeAxisAuthority != null)
     {
         return(TimeAxisAuthority.Where(x => x.User.Id == userid).Select(x => x.AuthorityType));
     }
     return(new List <AuthorityType>());
 }
コード例 #2
0
        public void RemoveAuth(AuthorityType e, User user)
        {
            var ele = TimeAxisAuthority.FirstOrDefault(x => x.AuthorityType == e && x.User.Id == user.Id);

            if (ele != null)
            {
                TimeAxisAuthority.Remove(ele);
            }
        }
コード例 #3
0
 public void RemoveAuth(TimeAxisAuthority e)
 {
     TimeAxisAuthority.Remove(e);
 }
コード例 #4
0
 public void AddAuth(TimeAxisAuthority e)
 {
     TimeAxisAuthority.Add(e);
 }