From: <pn...@hy...> - 2009-04-25 01:00:52
|
Author: pnguyen Date: 2009-04-24 18:00:47 -0700 (Fri, 24 Apr 2009) New Revision: 13067 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=13067 Modified: branches/HQ_4_1/web/resource/common/inventory/ViewGeneralProperties.jsp branches/HQ_4_1/web/resource/group/inventory/ListResources.jsp branches/HQ_4_1/web/resource/group/inventory/ViewGroup.jsp Log: HHQ-3074: allow owners of groups to edit (general properties, resources) their own groups. only show the Roles section if the user has View Roles permissions. Modified: branches/HQ_4_1/web/resource/common/inventory/ViewGeneralProperties.jsp =================================================================== --- branches/HQ_4_1/web/resource/common/inventory/ViewGeneralProperties.jsp 2009-04-25 00:43:55 UTC (rev 13066) +++ branches/HQ_4_1/web/resource/common/inventory/ViewGeneralProperties.jsp 2009-04-25 01:00:47 UTC (rev 13067) @@ -12,7 +12,7 @@ normal use of the program, and does *not* fall under the heading of "derived work". - Copyright (C) [2004, 2005, 2006], Hyperic, Inc. + Copyright (C) [2004-2009], Hyperic, Inc. This file is part of HQ. HQ is free software; you can redistribute it and/or modify @@ -128,7 +128,7 @@ </c:when> <c:when test="${resource.entityId.type == GROUP}"> <c:set var="editUrl" value="/resource/group/Inventory.do?mode=edit&eid=${resource.entityId.appdefKey}"/> - <c:set var="canModify" value="${useroperations['modifyResourceGroup']}"/> + <c:set var="canModify" value="${(webUser.id == resourceOwner.id) || useroperations['modifyResourceGroup']}"/> </c:when> </c:choose> Modified: branches/HQ_4_1/web/resource/group/inventory/ListResources.jsp =================================================================== --- branches/HQ_4_1/web/resource/group/inventory/ListResources.jsp 2009-04-25 00:43:55 UTC (rev 13066) +++ branches/HQ_4_1/web/resource/group/inventory/ListResources.jsp 2009-04-25 01:00:47 UTC (rev 13067) @@ -14,7 +14,7 @@ normal use of the program, and does *not* fall under the heading of "derived work". - Copyright (C) [2004, 2005, 2006], Hyperic, Inc. + Copyright (C) [2004-2009], Hyperic, Inc. This file is part of HQ. HQ is free software; you can redistribute it and/or modify @@ -31,6 +31,7 @@ USA. --%> +<tiles:importAttribute name="resourceOwner" ignore="false"/> <!-- CONSTANT DEFINITIONS --> <hq:constant @@ -115,10 +116,9 @@ </div> <!-- / --> - <tiles:insert definition=".toolbar.addToList"> - <tiles:put name="showAddToListBtn"><c:out value="${not empty useroperations['modifyResourceGroup']}"/></tiles:put> - <tiles:put name="showRemoveBtn"><c:out value="${not empty useroperations['modifyResourceGroup']}"/></tiles:put> + <tiles:put name="showAddToListBtn"><c:out value="${(webUser.id == resourceOwner.id) || useroperations['modifyResourceGroup']}"/></tiles:put> + <tiles:put name="showRemoveBtn"><c:out value="${(webUser.id == resourceOwner.id) || useroperations['modifyResourceGroup']}"/></tiles:put> <tiles:put name="addToListUrl" beanName="addToListUrl"/> <tiles:put name="widgetInstanceName" beanName="widgetInstanceName"/> <tiles:put name="pageSizeAction" beanName="psAction" /> Modified: branches/HQ_4_1/web/resource/group/inventory/ViewGroup.jsp =================================================================== --- branches/HQ_4_1/web/resource/group/inventory/ViewGroup.jsp 2009-04-25 00:43:55 UTC (rev 13066) +++ branches/HQ_4_1/web/resource/group/inventory/ViewGroup.jsp 2009-04-25 01:00:47 UTC (rev 13067) @@ -15,7 +15,7 @@ normal use of the program, and does *not* fall under the heading of "derived work". - Copyright (C) [2004, 2005, 2006], Hyperic, Inc. + Copyright (C) [2004-2009], Hyperic, Inc. This file is part of HQ. HQ is free software; you can redistribute it and/or modify @@ -153,7 +153,9 @@ <!-- / --> </div> <div id="panelContent"> -<tiles:insert page="/resource/group/inventory/ListResources.jsp"/> +<tiles:insert page="/resource/group/inventory/ListResources.jsp"> + <tiles:put name="resourceOwner" beanName="ResourceOwner"/> +</tiles:insert> </div> </div> |