📄 perms.jsp
字号:
border-width : 0px 0px 1px 0px; padding : 2px;}.jive-permslist .jive-permtabs .jive-springtab { border-width : 0px 0px 1px 0px;}.jive-permslist .jive-userlist .jive-perm-box { border-width : 0px 1px 1px 1px; padding : 0px;}.jive-selected-permtab A, .jive-permtab A,.jive-selected-permtab A:hover, .jive-permtab A:hover,.jive-selected-permtab A:visited, .jive-permtab A:visited { text-decoration : none; color : #000;}.jive-selected-permtab A:hover, .jive-permtab A:hover { text-decoration : underline;}.jive-tabtext { padding : 0px 2px 5px 2px;}.jive-perm-headerrow { font-size : 11px; font-weight : normal; padding : 2px 2px 2px 5px; border-bottom : 1px #ddd solid; font-weight : bold;}.jive-perm-box TABLE { border-width : 0px !important;}.jive-deletebutton { font-size : 11px; font-family : tahoma;}</style><table cellpadding="0" cellspacing="0" border="0"><% if ("perms".equals(show)) { %> <tr> <td> <b>Permissions Summary</b> </td> <td> <a href="#" onclick="helpwin('perms','general');return false;" title="Click for help" ><img src="images/help-16x16.gif" width="16" height="16" border="0" hspace="8"></a> </td> </tr><% } else if ("new".equals(show)) { %> <tr> <td> <b>Grant New Permissions</b> </td> <td> <a href="#" onclick="helpwin('perms','new');return false;" title="Click for help" ><img src="images/help-16x16.gif" width="16" height="16" border="0" hspace="8"></a> </td> </tr><% } %></table><% if (userErrors.size() > 0 || groupErrors.size() > 0) { %> <p class="jive-error-text"> Errors adding permission - see below. </p><% } else if (updatedPerms) { %> <p style="color:#090;"> Permissions updated successfully. </p><% } %><br><form action="perms.jsp" method="post" name="permform"><input type="hidden" name="cat" value="<%= categoryID %>"><input type="hidden" name="forum" value="<%= forumID %>"><input type="hidden" name="permGroup" value="<%= permGroup %>"><input type="hidden" name="show" value="<%= show %>"><input type="hidden" name="add" value="<%= add %>"><div class="jive-permslist"><table cellpadding="0" cellspacing="0" border="0" width="100%"><%-- ===== Tabs Row ===== --%><tr> <td> <div class="jive-permtabs"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="jive-spacertab" width="1%"> </td> <td class="jive-<%= (("perms".equals(show)) ? "selected-" : "") %>permtab" width="1%" nowrap> <div class="jive-tabtext"> <a href="perms.jsp?cat=<%= categoryID %>&forum=<%= forumID %>&permGroup=<%= permGroup %>&show=perms" >Permission Summary</a> </div> </td> <td class="jive-spacertab" width="1%"> </td> <td class="jive-<%= (("new".equals(show)) ? "selected-" : "") %>permtab" width="1%" nowrap> <div class="jive-tabtext"> <a href="perms.jsp?cat=<%= categoryID %>&forum=<%= forumID %>&permGroup=<%= permGroup %>&show=new" >Grant New Permission</a> </div> </td> <td class="jive-springtab" width="97%"> </td> </tr> </table> </div> </td></tr><%-- ===== Perm Summary ===== --%><% boolean hadAnyPermsSet = false; %><% if ("perms".equals(show)) { %> <tr> <td> <div class="jive-userlist"> <table class="jive-perm-box" cellpadding="0" cellspacing="1" border="0" width="100%"> <tr> <th width="39%"> </th> <% for (int i=0; i<permGroupDef.length; i++) { String permGroupName = (String)permNames.get(new Long(permGroupDef[i])); %> <th bgcolor="#dddddd" width="<%= (60/permGroupDef.length) %>%"><%= permGroupName %></th> <% } %> <th width="1%"> Remove </th> </tr> <% if ("perms".equals(show) && permGroup == CONTENT_GROUP) { %> <tr> <td colspan="<%= (permGroupDef.length+1) %>"> <div class="jive-perm-headerrow"> User Types </div> </td> <td> </td> </tr> <tr class="jive-special"> <td class="jive-first"> Anyone * </td> <% hadAnyPermsSet = false; for (int i=0; i<permGroupDef.length; i++) { String cbName = "cb_update_anon_" + permGroupDef[i]; boolean hasPerm = permManager.anonymousUserHasPermission(permGroupDef[i]); hadAnyPermsSet |= hasPerm; %> <td class="jive-perm-cell"> <input type="hidden" name="was<%= cbName %>" value="<%= permGroupDef[i] %>"> <input type="checkbox" name="<%= cbName %>" value="<%= permGroupDef[i] %>" onclick="alertButtons(this.form,'update,cancel');" <%= ((hasPerm) ? "checked" : "") %>> </td> <% } %> <td width="1%" align="center" bgcolor="#ffffff"> <% if (hadAnyPermsSet) { %> <a href="perms.jsp?remove=true&removetype=anon&cat=<%= categoryID %>&forum=<%= forumID %>&permGroup=<%= permGroup %>" title="Click to clear all permissions for guests." onclick="return confirm('Are you sure you want to remove all permissions for guests?');" ><img src="images/button_delete.gif" width="17" height="17" border="0"></a> <% } else { %> <img src="images/button_delete_inact.gif" width="17" height="17" border="0" title="No permissons to remove."> <% } %> </td> </tr> <tr class="jive-special"> <td class="jive-first"> Registered Users * </td> <% hadAnyPermsSet = false; for (int i=0; i<permGroupDef.length; i++) { String cbName = "cb_update_reg_" + permGroupDef[i]; boolean hasPerm = permManager.registeredUserHasPermission(permGroupDef[i]); hadAnyPermsSet |= hasPerm; %> <td class="jive-perm-cell"> <input type="hidden" name="was<%= cbName %>" value="<%= permGroupDef[i] %>"> <input type="checkbox" name="<%= cbName %>" value="<%= permGroupDef[i] %>" onclick="alertButtons(this.form,'update,cancel');" <%= ((hasPerm) ? "checked" : "") %>> </td> <% } %> <td width="1%" align="center" bgcolor="#ffffff"> <% if (hadAnyPermsSet) { %> <a href="perms.jsp?remove=true&removetype=reg&cat=<%= categoryID %>&forum=<%= forumID %>&permGroup=<%= permGroup %>" title="Click to clear all permissions for all registered users." onclick="return confirm('Are you sure you want to remove all permissions for all registered users?');" ><img src="images/button_delete.gif" width="17" height="17" border="0"></a> <% } else { %> <img src="images/button_delete_inact.gif" width="17" height="17" border="0" title="No permissons to remove."> <% } %> </td> </tr> <tr> <td colspan="<%= (permGroupDef.length+2) %>"> </td> </tr> <% } %> <tr> <td colspan="<%= (permGroupDef.length+1) %>"> <div class="jive-perm-headerrow"> Users </div> </td> <td> </td> </tr> <% // Get the list of users SortedMap userPerms = getUserPermMap(permManager, permGroupDef); // Only show the list if there are users to show if (userPerms.size() == 0) { %> <tr> <td colspan="<%= (permGroupDef.length+2) %>" style="padding-left:3px;"> No user permissions. </td> </tr> <% } if (userPerms.size() > 0) { %> <% int row = 0; for (Iterator iter=userPerms.keySet().iterator(); iter.hasNext(); ) { User user = (User)iter.next(); Permissions perms = (Permissions)userPerms.get(user); boolean userIsSystemAdmin = perms.hasPermission(Permissions.SYSTEM_ADMIN); %> <tr class="jive-<%= ((row++%2==0) ? "odd" : "even") %>"> <td class="jive-first"> <a href="editUser.jsp?user=<%= user.getID() %>" ><%= user.getUsername() %></a> </td> <% for (int i=0; i<permGroupDef.length; i++) { String cbName = "cb_update_u_" + user.getID() + "_" + permGroupDef[i]; boolean isSystemAdminPerm = perms.hasPermission(permGroupDef[i]) && permGroupDef[i] == Permissions.SYSTEM_ADMIN; %> <td class="jive-perm-cell<%= ((isSystemAdminPerm) ? "-admin" : "") %>"> <input type="hidden" name="was<%= cbName %>" value="<%= permGroupDef[i] %>"> <input type="checkbox" name="<%= cbName %>" value="<%= permGroupDef[i] %>" <%= ((perms.hasPermission(permGroupDef[i])) ? " checked" : "") %> onclick="alertButtons(this.form,'update,cancel');"> </td> <% } %> <td align="center" bgcolor="#ffffff"> <a href="perms.jsp?remove=true&removetype=user&user=<%= user.getID() %>&cat=<%= categoryID %>&forum=<%= forumID %>&permGroup=<%= permGroup %>" title="Click to remove all permissions for this user." <% if (userIsSystemAdmin) { %> onclick="return confirm('WARNING:\n\nYou are about to remove permissions for a system administrator. Are you sure you want to do this?');" <% } else { %> onclick="return confirm('Are you sure you want to remove all permissions for this user?');" <% } %> ><img src="images/button_delete.gif" width="17" height="17" border="0"></a> </td> </tr> <% } } %> <tr> <td colspan="<%= (permGroupDef.length+1) %>"> <br> <div class="jive-perm-headerrow"> Groups </div> </td> <td> </td> </tr> <% // Get the list of users SortedMap groupPerms = getGroupPermMap(permManager, permGroupDef); // Only show the list if there are users to show if (groupPerms.size() == 0) { %> <tr> <td colspan="<%= (permGroupDef.length+2) %>" style="padding-left:3px;"> No group permissions. <br><br> </td> </tr> <% } else { %> <% int row = 0; for (Iterator iter=groupPerms.keySet().iterator(); iter.hasNext(); ) { Group group = (Group)iter.next(); Permissions perms = (Permissions)groupPerms.get(group); %> <tr class="jive-<%= ((row++%2==0) ? "odd" : "even") %>"> <td class="jive-first"> <a href="editGroup.jsp?group=<%= group.getID() %>" ><%= group.getName() %></a>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -