     return rights
 
 getSelfRights = (tr) ->
-#    rights = []
-#    tr.find(SELF_RIGHT_COL).find(".customLabel").each ->
-#      rights.push($(@).text())
-#    return rights
-  return null
+    rights = []
+    tr.find(SELF_RIGHT_COL).find(".customLabel").each ->
+      rights.push($(@).text())
+    return rights
 
 getRoles = (tr) ->
     roles = []

    $("#addRightUi").parent().append(" ")
    populateRightComboBox($(@).parents("tr"))
    enableSaveButtonIfPossible($(@).parents("tr"))

  #Wire up Add Role button
  $("#addGroupButton").click ->


  populateTable(roles)

  $("#addSelfRightUi button").click ->
    console.log("Clicking the self button")
    option = $('#addSelfRightUi option:selected')
    if (option.val() == 'none')
      return
    text = option.text()
    right = createLabel('right', text)
    right = wrapInputWithDeleteButton(right, "span", text)
    $("#addSelfRightUi").parent().append(right)
    $("#addSelfRightUi").parent().append(" ")
    populateRightComboBox($(@).parents("tr"))
    enableSaveButtonIfPossible($(@).parents("tr"))

  $("#addRightUi button").click ->
    console.log("The regular button clicked")
    option = $('#addRightUi option:selected')
    if (option.val() == 'none')
      return
