-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Set default error message for all concurrecy issues #1158
Comments
|
- Check status of Item or Collection with database object (for thread-safety)
(part 1), fix - Added exception class that can be extended by classes that want to provide a meaningful error message to the user (ImejiExceptionWithUserMessage) - Refactored WorkflowException - Fixed bug in CRUDTransaction
(part 2) - Added new exception type (ImejiExceptionWithUserMessage) to exception handling in presentation layer
(part 3) - Refactored ReloadBeforeSaveException (extends now ImejiExceptionWithUserMessage) - Refactored ImejiExceptionWithUserMessage
To sum up: The ticket looks at situations in which two users access and edit/change a shared object (i.e. item, collection, user, user group) simultaneously without knowing of each other. Situation 1: Two users edit or change the content of a shared object simultaneously. Saftey mechanism triggered: "Reload before save" Example: Two users open an item simultaneously and edit its (meta-) data, i.e. title and author list. The user who saves last will see this error message: The general format of the error message is: Situation 2: At least one user changes the status of the shared object such that the other user's action is not valid any more. Safety mechanism triggered: "Valid operation", check if the intended operation is valid for the object and its current status Changes in an object's status are:
Forbidden is (example):
Example: Two users access a published collection simultaneously. One user starts to edit the (meta)-data of the collection. The other user discards the collection. The first user then tries to save her/his changes. The user will see this error message: The general format of the error message is: Situation 3: At least one user changes the access rights of a shared and concurrently accessed object. Safety mechanism triggered: Authorization (This situation is linked to ticket #1155 ) Example: One user opens a shared collection for editing while the other user revokes the first user's grant for the collection. The first user tries to save her/his changes without knowing that permissions have been revoked. ! Currently the first user's changes are still saved (shouldn't #1155). Only when re-reading the collection from database in order to present it in GUI, the change in access rights is detected and error message Insufficient permissions (Forbidden) [403] is shown. ToDo in #1155: Show error message of sort: Note:
In situation 1 the first two checks pass and the 3rd fails. |
- Refactoring of existing code - Relocated security check into Jena transaction - Changed exception handling in EditCollectionBean
- lower layers were fixed with #1158 - added exception handling for NotFoundException and NotAllowedError
Testserver: qa imeji Situation 3: will be fixed in ticket #1155 |
Testserver: qa imeji
Browser: ff
Version: 4.6 - build date 2019-08-30 12:57:36
User: admin
Actions:
user1: edits collection xy
user2 (admin): Admin -> Browse user -> select user 1 -> revokes grants of collection xy
user1: saves changes ->
same for "edit user group"
same for withdraw collection and edit collection info in parallel (current warning:; Page has to be reloaded/error during editing)
same for selete ans edit in parallel (current warning: "error durching editing")
Observation: user gets message "insufficient permissions 403"
Expected Result: Defned default message for concurrency issues is displayed
The text was updated successfully, but these errors were encountered: