public void OnAddGroupClicked(object o, EventArgs args) { List <string> tmp = new List <string> (); foreach (KeyValuePair <string, LdapEntry> kvp in _allGroups) { if (kvp.Key == primaryGroupLabel.Text || _memberOfGroups.ContainsKey(kvp.Key)) { continue; } tmp.Add(kvp.Key); } SelectGroupsDialog sgd = new SelectGroupsDialog(tmp.ToArray()); foreach (string name in sgd.SelectedGroupNames) { _memberOfStore.AppendValues(name); if (!_memberOfGroups.ContainsKey(name)) { _memberOfGroups.Add(name, "memberUid"); } LdapAttribute attr = new LdapAttribute("memberUid", conn.Data.GetAttributeValueFromEntry(currentEntry, "uid")); LdapModification lm = new LdapModification(LdapModification.ADD, attr); _modsGroup.Add(name, lm); updateGroupMembership(); _modsGroup.Clear(); } }
public void OnSetPrimaryGroupClicked(object o, EventArgs args) { List <string> tmp = new List <string> (); foreach (KeyValuePair <string, LdapEntry> kvp in _allGroups) { if (kvp.Key == primaryGroupLabel.Text) { continue; } tmp.Add(kvp.Key); } SelectGroupsDialog sgd = new SelectGroupsDialog(tmp.ToArray()); if (sgd.SelectedGroupNames.Length > 0) { primaryGroupLabel.Text = sgd.SelectedGroupNames[0]; } }
public void OnSetPrimaryGroupClicked(object o, EventArgs args) { List<string> tmp = new List<string> (); foreach (KeyValuePair<string, LdapEntry> kvp in _allGroups) { if (kvp.Key == primaryGroupLabel.Text) continue; tmp.Add (kvp.Key); } SelectGroupsDialog sgd = new SelectGroupsDialog (tmp.ToArray()); if (sgd.SelectedGroupNames.Length > 0) primaryGroupLabel.Text = sgd.SelectedGroupNames[0]; }
public void OnAddGroupClicked(object o, EventArgs args) { List<string> tmp = new List<string> (); foreach (KeyValuePair<string, LdapEntry> kvp in _allGroups) { if (kvp.Key == primaryGroupLabel.Text || _memberOfGroups.ContainsKey (kvp.Key)) continue; tmp.Add (kvp.Key); } SelectGroupsDialog sgd = new SelectGroupsDialog (tmp.ToArray ()); foreach (string name in sgd.SelectedGroupNames) { _memberOfStore.AppendValues (name); if (!_memberOfGroups.ContainsKey (name)) _memberOfGroups.Add (name, "memberUid"); LdapAttribute attr = new LdapAttribute ("memberUid", conn.Data.GetAttributeValueFromEntry (currentEntry, "uid")); LdapModification lm = new LdapModification (LdapModification.ADD, attr); _modsGroup.Add (name, lm); updateGroupMembership (); _modsGroup.Clear (); } }