]> source.dussan.org Git - archiva.git/commitdiff
PR: MRM-260
authorMaria Odea B. Ching <oching@apache.org>
Thu, 21 Dec 2006 08:51:39 +0000 (08:51 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Thu, 21 Dec 2006 08:51:39 +0000 (08:51 +0000)
Updated managedRepositories.jsp.
Added "archiva-edit-configuration" operation specific for archiva system admin only to disallow updating of the indexer for all users with repository manager roles.

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@489289 13f79535-47bb-0310-9956-ffa450edef68

archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaRoleConstants.java
archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaSystemAdministratorRoleProfile.java
archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/index.jsp
archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/managedRepositories.jsp

index 1ab7f4be5c338dbce8d9fb2c95a15dd3c69c727f..e256887cbcce832f83b0b8ee70a9f0d532d75def 100644 (file)
@@ -58,4 +58,6 @@ public class ArchivaRoleConstants
     public static final String OPERATION_EDIT_REPOSITORY = "archiva-edit-repository";
 
     public static final String OPERATION_REPOSITORY_UPLOAD = "archiva-upload-repository";
+
+    public static final String OPERATION_EDIT_CONFIGURATION = "archiva-edit-configuration";
 }
index 6470f26d3cd6c8f78c31bf60bb47d54fc2d50a05..febded8e73aaa9ccfb772d46d04c461899210f3c 100644 (file)
@@ -38,6 +38,7 @@ public class ArchivaSystemAdministratorRoleProfile
     {
         List operations = new ArrayList();
         operations.add( ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION );
+        operations.add( ArchivaRoleConstants.OPERATION_EDIT_CONFIGURATION );
         operations.add( ArchivaRoleConstants.OPERATION_MANAGE_USERS );
         operations.add( ArchivaRoleConstants.OPERATION_RUN_INDEXER );
         operations.add( ArchivaRoleConstants.OPERATION_REGENERATE_INDEX );
index 8c795d8c39a1222a52797da270877abd94c22d6f..cca73f9c0a3ce7a3799ae65e326e1ed65152c88e 100644 (file)
@@ -32,7 +32,9 @@
 <div>
   <div style="float: right">
     <%-- TODO replace with icons --%>
+    <pss:ifAuthorized permission="archiva-edit-configuration" resource="*">
     <a href="<ww:url action="configure" />">Edit Configuration</a>
+    </pss:ifAuthorized>
   </div>
   <h2>Configuration</h2>
 </div>
index 4fcf4418927041235342098d11b02d751c0d3d3e..9e2fd6eb0baa9cd87e10586bb01866f243a54afd 100644 (file)
@@ -48,6 +48,7 @@
   <strong>There are no managed repositories configured yet.</strong>
 </c:if>
 <c:forEach items="${repositories}" var="repository" varStatus="i">
+  <pss:ifAnyAuthorized permissions="archiva-edit-repository, archiva-delete-repository" resource="${repository.id}">
   <div>
     <div style="float: right">
       <ww:url id="editRepositoryUrl" action="editRepository" method="input">
@@ -57,8 +58,8 @@
         <ww:param name="repoId" value="%{'${repository.id}'}" />
       </ww:url>
       <%-- TODO replace with icons --%>
-      <pss:ifAuthorized permission="archiva-edit-repository" resource="${repository.id}"><ww:a href="%{editRepositoryUrl}">Edit Repository</ww:a></pss:ifAuthorized>
-      <pss:ifAuthorized permission="archiva-delete-repository" resource="${repository.id}"><ww:a href="%{deleteRepositoryUrl}">Delete Repository</ww:a></pss:ifAuthorized>
+      <ww:a href="%{editRepositoryUrl}">Edit Repository</ww:a>
+      <ww:a href="%{deleteRepositoryUrl}">Delete Repository</ww:a>
     </div>
     <h3>${repository.name}</h3>
     <table class="infoTable">
       </tr>
     </table>
   </div>
+  </pss:ifAnyAuthorized>
 </c:forEach>
 </div>