anchor.diff:              },
               "json"
           );
  -    });
  +    };
  +    
  +    var renderPermissionMap = function() {
  +        $("#assignments").html("");
  +        $.get(
  +                "<c:url value="/api/permissionAssignmentMap"/>", 
  +                {
  +                    owner: '${ permissionDefinition.owner.fname }',
  +                    activity: '${ permissionDefinition.activity.fname }',
  +                    target: '${ permissionDefinition.target.key }',
  +                    principals: [<c:forEach items="${ principals }" var="principal" varStatus="status">'${ principal.principalString }'${ status.last ? '' : ', '}</c:forEach>],
  +                },
  +                function(data) {
  +                    allAssignments = data.assignments;
  +                    addAssignments(allAssignments, $("#assignments"));
  +                },
  +                "json"
  +            );
  +    };
  +    
  +    $(document).ready(renderPermissionMap);
   
   
   });
  
positive.code:         });
      };
      
      $(document).ready(function(){
          $.get(
              "<c:url value="/api/permissionAssignmentMap"/>", 
              { 
                  owner: '${ permissionDefinition.owner.fname }',
                  activity: '${ permissionDefinition.activity.fname }',
                  target: '${ permissionDefinition.target.key }',
  
negative.code:     var addAssignments = function(assignments, list) {
          $(assignments).each(function(idx, assignment) {
              
              // determine the current select menu option
              var type = assignment.type;
              if (type.match(inheritRegex)) {
                  type = "INHERIT";
              }
              
              // determine the text for the inherit option
              var inheritText;
              if (assignment.type == 'INHERIT_GRANT') {
                  inheritText = "<spring:message code="inherit.grant"/>";
              } else if (assignment.type == "INHERIT_DENY") {
                  inheritText = "<spring:message code="inherit.deny"/>";
              } else {
                  inheritText = "<spring:message code="inherit"/>";
              }
              
              // build up the markup
              var li = $(document.createElement("li"));
              var span = $(document.createElement("span")).addClass("assignment-wrapper")
                  .append($(document.createElement("span")).addClass("principal-name").text(assignment.principal.name + " "));
              var select = $(document.createElement("select"));
              var html = "<option value=\"INHERIT\">" + inheritText + "</option>";
              html += "<option value=\"GRANT\"><spring:message code="grant"/></option>";
              html += "<option value=\"DENY\"><spring:message code="deny"/></option></select></span>";
              select.html(html).val(type)
                  .addClass(assignment.type.toLowerCase().replace("_", "-"))
                  .change(function () {
                  updatePermission(assignment.principalId, $(this).val());
              });
              span.append(select);
              li.append(span);
  
  