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
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
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
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
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
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
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
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
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
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
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
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
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
Tom Page
df8bf4aa4b
RM-2197 Replace "No Clearance" with "Unclassified" in list of levels.
...
Created a notion of clearance level distinct from (but related to)
classification level. A clearance level references the highest
classification level it has access to. A SecurityClearance now contains a
ClearanceLevel, which in turn contains a ClassificationLevel.
Created a ClearanceLevelManager and initialise it at the same time as the
ClassificationLevelManager.
+review RM
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103929 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-11 08:16:03 +00:00
Tom Page
0cf19c441c
Revert RM-2123 Update Java API to filter with current user's clearance.
...
The circular dependency causes a problem when loading the Spring context.
Reverting to rethink the approach.
+review RM-47
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103856 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-08 09:26:27 +00:00
Tom Page
3590b9327d
RM-2123 Update Java API to filter with current user's clearance.
...
+review RM
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103851 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-08 08:11:58 +00:00
David Webster
d1dc0d1875
RM-2120: Add unit test for usersecurityclearance.put webscript & add it (and get) to test suite
...
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103829 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-07 14:04:26 +00:00
David Webster
98155a3147
RM-2119: Update Java API to return the security clearance object when setting it.
...
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103826 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-07 13:58:16 +00:00
Tom Page
abcd43455c
RM-2119 Don't need to explicitly apply the aspect.
...
By setting the property on the node the aspect will be applied
automatically if it hasn't already been applied.
+review RM-45
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103786 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-07 07:59:44 +00:00
Neil McErlean
568a7c1dc8
Moer RM-2113 review comments. Renaming SecurityClearance.getClassificationLevel to getClearanceLevel
...
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103782 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-06 16:26:50 +00:00
Tom Page
07ce45fec8
RM-2119 Java API to change a user's security clearance.
...
+review RM
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103777 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-06 15:27:35 +00:00
Neil McErlean
a0c9b6dc73
Initial unit tests for RM-2113.
...
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103745 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-06 07:33:24 +00:00
Tuna Aksoy
1b1056523d
RM-2114 (REST API to GET users security clearance)
...
+review RM-43
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103743 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-05-05 21:54:49 +00:00
Tuna Aksoy
b786accb40
RM-2061 (Add classification properties to document details view)
...
RM-2062 (Add classification properties to record details view)
+review RM-29
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@102759 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-27 13:45:05 +00:00
Tuna Aksoy
718b2eec44
RM-2193 (Cannot classify non electronic document)
...
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@102702 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-26 20:02:30 +00:00
Tom Page
0d01f1c83f
RM-2045 Check that content is not re-classified.
...
Currently this is not supported, although it will be needed in the future.
Also take the opportunity to change the unit tests to use:
when(x.y()).thenReturn(z));
rather than:
doReturn(z).when(x).y();
This is because I noticed the javadoc for "doReturn" gives a good
explanation of when to use each (use the former whenever possible for
readability; use the latter if there's no choice).
+review RM-25
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@102231 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-21 08:06:31 +00:00
Tom Page
bf04115229
RM-2045 Fix references to "document" to refer to "content".
...
We can use the same API to classify documents and records.
+review RM-25
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@102160 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-20 09:04:01 +00:00
Tom Page
17ca9d431f
RM-2045 Update unit test to use level ids, rather than levels.
...
+review RM-25
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@102158 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-20 08:39:08 +00:00
Tom Page
a572fe0916
RM-2045 Add validation that the node is a content node.
...
This is needed as the API method is specifically for content nodes. We
will deal with record nodes later, and possible folder nodes much later.
+review RM-25
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@102157 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-20 08:39:06 +00:00
Tuna Aksoy
f78917ea24
RM-2047 (Set classification repository action)
...
* Unit test added
+review RM-28
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@102153 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-19 19:49:22 +00:00
Tuna Aksoy
f1cefc629c
RM-2045 (Java API to add a classification to a document)
...
* Changed the code to save the id's of classification reasons and levels
+ review RM-25
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@102118 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-17 13:18:11 +00:00
Tom Page
5542fc7c81
RM-2045 Create Java API to classify a document.
...
Create dedicated objects to handle queries against the list of configured
classification levels and reasons.
+review RM-25
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@101986 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-16 10:07:07 +00:00
Tuna Aksoy
e533c53f3d
Fixed failing unit test
...
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@101803 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-14 12:51:47 +00:00
Tom Page
7d52c49b2b
RM-1947 New constraint to avoid invalid classification levels.
...
Create a service locator class to allow the non-Spring constraint to access
the Spring service.
+review RM-21
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@101788 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-14 09:33:51 +00:00
Tuna Aksoy
2cfcc0ac05
RM-1842 (View users security clearance)
...
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@101590 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-09 18:14:48 +00:00
Roy Wetherall
bf91f5e1a1
Reduce number of compilation warnings and re-format where nessesary.
...
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@101538 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-09 01:58:11 +00:00
Tom Page
e6121166fc
RM-1947 Restrict the classification levels shown to a user.
...
Currently we don't check what classification level the user has, and
instead assume that they have the highest security clearance. The work
to assign a security clearance to a user will be in RM-2112.
+review RM
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@101413 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-08 14:55:58 +00:00
Tom Page
27a0affb19
Rename ExceptionUtils.intercept to expectedException.
...
+review RM-10
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@101338 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-08 10:32:40 +00:00
Tom Page
c18089a3f0
RM-2028 Create util method to validate classification fields.
...
Also change the freemarker script to use the built-in JSON escaping.
+review RM-14
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@101242 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-07 13:55:42 +00:00
Tom Page
0f7bac797a
RM-2028 Add new test file to test suite.
...
+review RM-14
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@101116 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-04-02 11:08:24 +00:00