/// <summary> /// Gets rights for a role type defined as default rights available for right type. /// </summary> /// <param name="typeID">pass role type id</param> /// <returns>list of rights for a role type</returns> public Dictionary<string, UserRight> GetRights(short typeID) { var roleType = new BORoleType(typeID); var rightRoleTypes = BORightRoleTypeX.GetAllForRoleType(roleType).Cast<BORightRoleTypeX>().ToList(); var roleTypeRights = new Dictionary<string, UserRight>(); foreach (BORightRoleTypeX itemRoleType in rightRoleTypes) { var objBORight = new BORight(itemRoleType.Right.ID); if (!roleTypeRights.ContainsKey(objBORight.Key.Trim())) { UserRight userRight = new UserRight() { ShowCreate = objBORight.ShowCreate, ShowDelete = objBORight.ShowDelete, ShowUpdate = objBORight.ShowUpdate, ShowExecute = objBORight.ShowExecute, ShowRead = objBORight.ShowRead, Name = objBORight.Name.Trim(), Key = objBORight.Key.Trim(), Description = objBORight.Description.Trim(), }; roleTypeRights.Add(objBORight.Key.Trim(), userRight); } } return roleTypeRights; }
public BORoleTypeComparer(BORoleType.Columns column, BORoleType.SortDirections direction) { _column = column; _direction = direction; }
public void Save(BORoleType roletype) { _roletypeRepository.Save(roletype); }