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>()); }
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); } }
public void RemoveAuth(TimeAxisAuthority e) { TimeAxisAuthority.Remove(e); }
public void AddAuth(TimeAxisAuthority e) { TimeAxisAuthority.Add(e); }