- changed status to open
Implement "Inspected" Flag for Community Posts
Community posts (formelrly called gold standard posts) are publication posts which do not belong to a specific user. Instead they can be changed by everyone. Publication data of community posts is stored in a separate database table 'gold_standard'. A history of these entries is kept track of in the table 'log_gold_standard'. Some specific users however, such as librarians, are further allowed to set a flag on a community post version that marks the posts as having being inspected (or approved) by someone who knows what a hich quality post should look like.
This task is implementing the 'inspected feature' via:
- an additional tinyint field in the database tables (0 for non-inspected, 1 for inspected)
- a marker on the front end whether the post has been inspected. The marker can be toggled by users having a specific right.
- The respective right is given via methods hasRight(User u, UserRight right) / ensureRight(User u, UserRight right) in PermissionDatabaseManager which are to be created with a first dummy implementation such that only users with the role admin are given this right. ensureRight throws an exception if the user does not have the right.
- the toggle button / checkbox is visible on the publication details page and on editPublication
- a change of the flag triggers a regular updatePost method on the LogicInterface
Comments (8)
-
Account Deleted -
Account Deleted - marked as blocker
-
Account Deleted - edited description
-
assigned issue to
-
- changed milestone to 3.0.1
-
Account Deleted I fixed some errors and it appears to run now.
The following still needs to be done:
- in the controller, there seems to be no check whether the user is allowed approve. It should ask PermissionDatabaseManager via a new method isAllowedToApprove
- checks like this should also rely on the same PermissionDatabaseManager method: <c:if test="${not empty postApproval and command.context.loginUser.role eq 'ADMIN'}">
- on the history page, there should be an indicator when a version has been approved
- the approved icon should have a left-margin. (I like 6px)
- goldstandard bookmarks should be approvable too (minor)
Nasim, can you do this please?
-
Regarding these issues:
- The new group-level-permission concept will be available as soon as we have merged the groups branch into default (very soon). Then we can check wether a user is allowed to makr a post as "inspected" by querying the loginUser object.
- The PermissionDatabaseManager should also check that
- Please do not have controllers use DatabaseManager directly (only through the logic interface if necessary)
-
Account Deleted yes, actually I meant asking the PermissionDatabaseManager via DBLogic.
-
- changed status to resolved
- Log in to comment