Commit afe49708 authored by Matija Obreza's avatar Matija Obreza

Updated ACL editor for app-blocks:1.4-SNAPSHOT

parent 417535ed
......@@ -48,7 +48,7 @@ public class AclEditController extends BaseController {
}
model.addAttribute("aclSids", aclService.getSids(id, className));
// Map<AclSid, Map<Permission, Boolean>>
model.addAttribute("aclEntries", aclService.getPermissions(id, className));
model.addAttribute("sidPermissions", aclService.getPermissions(id, className));
model.addAttribute("backUrl", backUrl);
model.addAttribute("roles", UserRole.values());
......
......@@ -30,18 +30,18 @@
</thead>
<tbody>
<c:forEach items="${aclSids}" var="aclSid" varStatus="status">
<c:set var="sid" value="${jspHelper.aclSidById(aclSid.id)}" />
<c:forEach items="${sidPermissions}" var="sidPermission" varStatus="status">
<c:set var="sid" value="${jspHelper.aclSidById(sidPermission.sid.id)}" />
<tr class="${status.count % 2 == 0 ? 'even' : 'odd'}">
<input type="hidden" name="sid" class="aclSid" value="${sidPermission.sid.id}"/>
<td>
<c:out value="${sid.fullName}"/>
<c:catch><a href="<c:url value='mailto:${sid.email}' />"><c:out value="${sid.email}" /></a></c:catch>
<c:catch><c:if test="${sid.email ne null}"><a href="<c:url value='mailto:${sid.email}' />"><c:out value="${sid.email}" /></a></c:if></c:catch>
<c:catch><c:if test="${sid.title ne null}"><c:out value="${sid.title}" /></c:if></c:catch>
</td>
<input type="hidden" name="sid" class="aclSid" value="${aclSid.id}"/>
<c:forEach items="${aclPermissions}" var="aclPermission">
<td><input type="checkbox" value="1" class="check" name="permissionValue${aclPermission.mask}" id="permissionValue${aclPermission.mask}" disabled="disabled" ${aclEntries[aclSid.sid][aclPermission.mask] ? 'checked' : '' }/></td>
<td><input type="checkbox" value="1" class="check" name="permissionValue${aclPermission.mask}" id="permissionValue${aclPermission.mask}" disabled="disabled" ${sidPermission.isGranting(aclPermission.mask) ? 'checked' : '' }/></td>
</c:forEach>
<td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment