Commit Graph

5254 Commits

Author SHA1 Message Date
David Webster
ab9a0e7cac WIP: Make it easier for whole team to validate/format JS code.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105622 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-05 13:48:00 +00:00
Tuna Aksoy
35db56b736 RM-2260 (Users with read&file permissions on content can not classify it if they are not the owners)
* Fixed failing integration test

+review RM-83

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105567 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-05 09:31:43 +00:00
Tuna Aksoy
3428ce40e6 RM-2129 (Check classification before method execution)
+review RM-69

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/DEV/ENFORCE@105565 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-05 08:51:17 +00:00
Tuna Aksoy
d9dc7c7e52 RM-2260 (Users with read&file permissions on content can not classify it if they are not the owners)
+review RM @rwetherall

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105541 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-04 15:41:00 +00:00
Neil McErlean
149bcaf2d5 Fix for slight coding issue - note there are no recorded problems from this.
Replaced String == with String.equals.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105496 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-03 20:23:04 +00:00
Tuna Aksoy
ce10e38225 RM-2247 (Add classification banner to document details)
RM-2248 (Add classification banner to record details)

+review RM

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105441 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-03 09:46:09 +00:00
Tom Page
dd05b5914c Change TestNG reporting format back to default.
Hopefully this will provide us with chronological information and we may
be able to use this to find out why the two intermittent tests are failing.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105333 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-02 14:44:40 +00:00
Tom Page
e98c269c49 Fix a few places I missed refactoring.
Hopefully this will fix the build.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105318 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-02 11:17:19 +00:00
Tom Page
ea0548bdf8 Rename ClassificationService to ClassificationSchemeService.
Also rename ClassificationServiceException to ClassificationException.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105317 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-02 10:20:37 +00:00
Tom Page
1becb69355 Fix failing test on Sonar build.
Avoid calling the I18N utility by checking the display label key directly.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105312 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-02 09:21:30 +00:00
Tuna Aksoy
7a558aa3d8 Fixed compilation issue
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/DEV/ENFORCE@105294 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-01 16:46:59 +00:00
Tuna Aksoy
e46ec39aa7 RM-2208 (Prevent classification of shared content)
+review RM @rwetherall

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105284 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-01 13:32:12 +00:00
Tuna Aksoy
1acae0e403 RM-2203 (Show selected classification reason id's rather than description)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105215 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-01 10:08:26 +00:00
Roy Wetherall
0b23552722 First pass at classification interceptor
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/DEV/ENFORCE@105194 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-01 08:20:12 +00:00
Roy Wetherall
3922228237 Dev branch for classification enforcement work
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/DEV/ENFORCE@105193 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-01 08:18:44 +00:00
Tom Page
16bde534af Use mock in unit test for ClearanceLevelManager.
Although I'm not sure exactly why this unit test failed on the Sonar build,
it seems sensible to remove the dependency on another class by using a mock.

+review RM

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105192 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-06-01 07:59:10 +00:00
Tuna Aksoy
c203ac2548 RM-2270: Fixed bean definition
+review RM-67

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105023 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-29 11:48:33 +00:00
David Webster
6f4775a393 RM-2270: WIP: Extending QuickShareService to prevent classified content being shared. Checking in for +review @taksoy @tpage @rweatherall @nmcerlean
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105022 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-29 10:53:36 +00:00
Tuna Aksoy
4d29332cb6 RM-2268 (If the currentPage attribute value is changed to a invalid one in the URL the Security Clearance page is not displayed in error)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104905 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-27 15:59:48 +00:00
Tom Page
5c077ef098 RM-2124 Fix typo in assertion message.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104769 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-22 14:48:16 +00:00
Tom Page
f083b3cf22 RM-2124 Application context tests for restricted classification.
+review RM

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104751 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-22 13:20:01 +00:00
Tom Page
587786c2de RM-2123 Ensure user has clearance to classify content.
Also add clearance check method into security profile.

+review RM-58

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104750 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-22 13:20:00 +00:00
Tom Page
3dc6ed9a71 RM-2123 Use runAsAuthentication instead of actual authentication.
Check that the user the command is run as has clearance to view the
classification levels, rather than the user that initiated the command.

+review RM-58

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104729 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-22 08:43:12 +00:00
Tom Page
833142e8f7 RM-2123 Make new patch for 3.0 apply to anything from before it.
+review RM-58

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104728 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-22 08:43:10 +00:00
Tom Page
90be46f97e RM-2123 Fix comparator to be the correct way around.
Also add application context tests to cover this case.

+review RM-58

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104700 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-20 15:39:46 +00:00
Tom Page
80634961a9 RM-2123 Move clearance checking to SecurityClearanceService.
Refactor ContentClassificationService#hasClearance so that it calls out to
SecurityClearanceService#isCurrentUserClearedForClassification. Restrict
isCurrentUserClearedForClassification so that it only applies to the current
authenticated user (we don't need to use it for anything else).  Also
extract classification level comparison to a new class.

+review RM-58

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104568 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-20 08:28:46 +00:00
Tom Page
d4b7eaa3bc RM-2123 Don't create a user called system.
Also add special check in clearance service that gives system user maximum
clearance.

+review RM-58

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104480 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-19 09:57:02 +00:00
Tuna Aksoy
4f5b1eb69a Removed warnings
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104477 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-18 21:24:33 +00:00
Tuna Aksoy
df58ce99a7 RM-2204 (Hover over classification reason id on properties page reveals nothing)
+review RM @rwetherall

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104476 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-18 21:22:17 +00:00
Neil McErlean
672253dda2 Added some javadoc to clarify that ExceptionUtils.expectedException doesn't try to work around checked exceptions.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104391 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-18 15:11:16 +00:00
Tom Page
5f6cf2187a RM-2123 Give clearance to the admin and system users.
Make sure this is executed as a patch and also bootstrapped into a clean
system using the BootstrapImporterModuleComponent.

Also restrict access to the classification levels (via the get API) to
only the levels that the user has clearance to.

+review RM

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104376 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-18 15:03:59 +00:00
Tom Page
582c179382 RM-2123 Create a new service for content classification.
Move methods to do with content from the ClassificationService and the
SecurityClearanceService into the ContentClassificationService.

Remove the dependency of SecurityClearanceService on ClassificationService
which will allow us to reverse this dependency in the next commit.  This is
needed in order to filter classifications by the current user's clearance.
Nb. This included adding a method in the SecurityClearanceService called
isClearedForClassification, which looks quite similar to a new API Roy
created hasClearance (see ContentClassificationService).  In the future we
should look to see if we can consolidate these.

Remove dependency of ClassificationServiceBootstrap on the services, so that
it can be passed into them. This allows us to provide access to the POJO
managers in the services (this is made harder as the POJO managers aren't
Spring beans).  In order to initialise these objects, change the POJO
managers to use setters rather than constructor arguments. This allows us
to store a reference to the manager before the data has been loaded.

Move the attribute service keys for classification levels and reasons into
the ClassifiedContentModel.

Expect NO_CLEARANCE to be passed into the ClearanceLevelManager, as
otherwise we have to have logic to exclude it (see initialise in the old
SecurityClearanceService) and then more logic to include it again (see the
old constructor for ClearanceLevelManager).

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104375 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-18 15:03:57 +00:00
Tuna Aksoy
36e35457ec RM-2160 (Update Classify Action config once users with security clearances exist)
+review RM-57

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104346 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-18 13:21:49 +00:00
Tuna Aksoy
31bb13aa1f RM-2160 (Update Classify Action config once users with security clearances exist)
+review RM @rwetherall @dwebster

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104308 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-15 16:20:16 +00:00
David Webster
d7f0120fa1 RM-2197: Adds missing unit tests, as identified by Tom during +review RM-56
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104306 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-15 16:09:36 +00:00
David Webster
be7142f439 RM-2197: restrict restrictList access, as suggested by Tom and Tuna during +review RM-56
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104305 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-15 16:07:20 +00:00
David Webster
c24df57404 RM-2197: Minor comment fix as pointed out by Tom during +review RM-56
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104304 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-15 16:06:16 +00:00
David Webster
b253e192d5 RM-2120: More accurate error checking in test, as almost suggested by Neil during +review RM-46
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104296 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-15 14:51:56 +00:00
David Webster
a8864e85f0 RM-2197: Set permissions on newly created API call.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104247 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-15 10:05:32 +00:00
David Webster
e5c5b2f9b5 RM-2197: Create REST GET API to return clearance levels
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104246 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-15 10:04:52 +00:00
Tuna Aksoy
a917639be9 RM-2228 (The Unclassified option is displayed twice as a option in Classification levels drop down from Classify Content)
+review RM @rwetherall

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104245 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-15 10:03:51 +00:00
David Webster
0a20c4db5a RM-2197: Extend Java service to return a list of security clearances the user can see.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104244 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-15 10:02:23 +00:00
Roy Wetherall
f0a50ac432 Added 'hasClearance' method to SecurityClearanceService to support EntryVoter and AfterInvocationProvider implementations
* relates to RM-2129 & RM-2130
 * added 'getCurrentClassification" method to ClassificationService
 * added concept of system classification level "Unclassified" .. it no longer is required to be specified in the JSON bootstrap since this is a well known and alway required basic classification level
 * added concept of system security clearance level "No Clearance" .. automatically added and relates to unclassified classificaiton level
 * unit tests updated and added
 * started to move some of the logic out of unit test base class and into helper library called 'AlfMock'!



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104229 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-15 03:21:08 +00:00
Neil McErlean
a539faa5d9 This is a part of an attempt to get the rm-automation project compiling and running on Java 1.8.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104181 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-14 14:56:25 +00:00
David Webster
0b70bfa133 RM-2120: Add error handling (and test) as suggested by Neil during + review RM-46
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104157 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-14 10:58:19 +00:00
Roy Wetherall
8b18d50208 RM-2198: Can't classify a frozen record.
* server integration tests added
 * UI integration tests added (based on adjusted acceptance critera on RM-2052)



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104141 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-14 04:14:30 +00:00
Tuna Aksoy
21893ae3f2 RM-2206 (Dynamic test suite configuration)
+review RM-49

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104045 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-12 19:58:34 +00:00
Tuna Aksoy
1a33dfc7e7 RM-2206 (Dynamic test suite configuration)
+review RM-49

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104044 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-12 19:16:04 +00:00
Tuna Aksoy
bb5b98d7cf RM-2206 (Dynamic test suite configuration)
+review RM @rwetherall

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104021 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-12 15:22:11 +00:00
Tuna Aksoy
33f2483f40 Fixed test name in the AllUnitTestSuite
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103976 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-11 14:38:03 +00:00