Author: dkuleshov
Date: 2012-01-24 07:41:30 -0500 (Tue, 24 Jan 2012)
New Revision: 5507
Modified:
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanerTool.java
Log:
EXOJCR-1707: Changed validation method's parameters, since no need to pass more than
one Permission to be validated
Modified:
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java
===================================================================
---
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java 2012-01-24
12:40:19 UTC (rev 5506)
+++
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java 2012-01-24
12:41:30 UTC (rev 5507)
@@ -62,8 +62,7 @@
*/
public static void cleanWorkspaceData(WorkspaceEntry wsEntry) throws DBCleanException
{
- SecurityHelper
- .validateSecurityPermissions(new
RuntimePermission[]{JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION});
+
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
Connection jdbcConn = getConnection(wsEntry);
boolean autoCommit =
DialectConstants.DB_DIALECT_SYBASE.equalsIgnoreCase(resolveDialect(wsEntry));
@@ -101,8 +100,7 @@
*/
public static void cleanRepositoryData(RepositoryEntry rEntry) throws
DBCleanException
{
- SecurityHelper
- .validateSecurityPermissions(new
RuntimePermission[]{JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION});
+
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
WorkspaceEntry wsEntry = rEntry.getWorkspaceEntries().get(0);
@@ -157,8 +155,7 @@
public static DBCleanerTool getRepositoryDBCleaner(Connection jdbcConn,
RepositoryEntry rEntry)
throws DBCleanException
{
- SecurityHelper
- .validateSecurityPermissions(new
RuntimePermission[]{JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION});
+
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
WorkspaceEntry wsEntry = rEntry.getWorkspaceEntries().get(0);
@@ -190,8 +187,7 @@
*/
public static DBCleanerTool getWorkspaceDBCleaner(Connection jdbcConn, WorkspaceEntry
wsEntry) throws DBCleanException
{
- SecurityHelper
- .validateSecurityPermissions(new
RuntimePermission[]{JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION});
+
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
boolean multiDb = getMultiDbParameter(wsEntry);
Modified:
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanerTool.java
===================================================================
---
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanerTool.java 2012-01-24
12:40:19 UTC (rev 5506)
+++
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanerTool.java 2012-01-24
12:41:30 UTC (rev 5507)
@@ -158,8 +158,7 @@
*/
protected void execute(List<String> scripts) throws SQLException
{
- SecurityHelper
- .validateSecurityPermissions(new
RuntimePermission[]{JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION});
+
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
// set needed auto commit mode
boolean autoCommit = connection.getAutoCommit();
Show replies by date