//------------------------------------------- public virtual void SaveActionAll(string[] actionIds) { Hashtable results = new Hashtable(); foreach (String actionId in actionIds) { string[] arrItem = actionId.Split('_'); if (arrItem.Length != 3) { continue; } String typeFullName = arrItem[0]; int roleId = cvt.ToInt(arrItem[1]); int aid = cvt.ToInt(arrItem[2]); if (roleId < 0 || aid <= 0) { continue; } if (Entity.GetType(typeFullName) == null) { continue; } String rkey = SecurityString.GetRoleKey(typeFullName, roleId); addActionToRole(results, rkey, aid); } _roleActionsAll = results; savePermissions(); }
public IList GetActionsByRole(IRole role) { if (role == null) { return(new ArrayList()); } return(getActionsByKey(SecurityString.GetRoleKey(role.Role.GetType().FullName, role.Role.Id))); }