Activation of public peer review links in the Latest reviewers panel is not available through peer portal settings. + removal of unused file.
This commit is contained in:
parent
959b13e01e
commit
b37b958a89
src/main
java/se/su/dsv/scipro
admin/pages/settings
peer/pages
resources
@ -25,6 +25,10 @@
|
||||
<td><label for="numberOfLatestReviewsDisplayed">Number of reviews to show in the "Latest reviewers" panel: </label></td>
|
||||
<td><input type="text" wicket:id="numberOfLatestReviewsDisplayed" name="numberOfLatestReviewsDisplayed" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="publicReviewsActivated">Activate public reviews with links in "Latest reviewers" panel: </label></td>
|
||||
<td><input type="checkbox" wicket:id="publicReviewsActivated" name="publicReviewsActivated" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<h5 class="peer-title">Settings for levels</h5>
|
||||
|
@ -77,10 +77,8 @@ public class AdminPeerSettingsPage extends AbstractAdminSettingsPage {
|
||||
numberOfLatestReviewsDisplayed.setRequired(true);
|
||||
add(numberOfLatestReviewsDisplayed);
|
||||
|
||||
// Checkbox for activating/inactiviting links to reviews in the Latest reviewers panel.
|
||||
//
|
||||
/*CheckBox publicReviewsActivated = new CheckBox("publicReviewsActivated");
|
||||
add(publicReviewsActivated);*/
|
||||
CheckBox publicReviewsActivated = new CheckBox("publicReviewsActivated");
|
||||
add(publicReviewsActivated);
|
||||
}
|
||||
@Override
|
||||
public void onSubmit(){
|
||||
|
@ -4,9 +4,12 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.wicket.PageParameters;
|
||||
import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||
|
||||
import se.su.dsv.scipro.SciProSession;
|
||||
import se.su.dsv.scipro.components.AbstractMenuPanel;
|
||||
import se.su.dsv.scipro.data.dao.interfaces.GeneralSystemSettingsDao;
|
||||
import se.su.dsv.scipro.data.dataobjects.GeneralSystemSettings;
|
||||
import se.su.dsv.scipro.data.dataobjects.Project;
|
||||
import se.su.dsv.scipro.data.dataobjects.User;
|
||||
import se.su.dsv.scipro.exceptions.AccessDeniedException;
|
||||
@ -20,6 +23,9 @@ import se.su.dsv.scipro.security.auth.roles.Roles;
|
||||
@Authorization(authorizedRoles={Roles.SYSADMIN}) //TODO Hidden for initial deployment
|
||||
public abstract class AbstractProjectPeerPage extends ProjectPage {
|
||||
|
||||
@SpringBean
|
||||
private GeneralSystemSettingsDao generalSystemSettingsDao;
|
||||
|
||||
public AbstractProjectPeerPage(final PageParameters pp) {
|
||||
super(pp);
|
||||
|
||||
@ -45,7 +51,7 @@ public abstract class AbstractProjectPeerPage extends ProjectPage {
|
||||
}
|
||||
|
||||
protected void checkAccessPrivileges(final PeerReview peerReview) {
|
||||
|
||||
GeneralSystemSettings gsettings = generalSystemSettingsDao.getGeneralSystemSettingsInstance();
|
||||
final Project requestingProject = peerReview.getPeerRequest().getProject();
|
||||
final User user = SciProSession.get().getUser();
|
||||
if( SciProSession.get().authorizedForRole(Roles.SYSADMIN) ) //Can view any review
|
||||
@ -55,6 +61,8 @@ public abstract class AbstractProjectPeerPage extends ProjectPage {
|
||||
final Project reviewingProject = peerReview.getProject();
|
||||
if( projectDao.isPartOf(user, reviewingProject) )
|
||||
return;
|
||||
if(gsettings.isPublicReviewsActivated())
|
||||
return;
|
||||
//If we've come this far, the user doesn't have access to the project and it's reviews
|
||||
throw new AccessDeniedException(this);
|
||||
}
|
||||
|
@ -1,52 +0,0 @@
|
||||
#General
|
||||
twoNewLines=\n\n
|
||||
twoNewLinesWithComma=,\n\n
|
||||
linkText = Click on the link to see it in SciPro:\n
|
||||
mailSubject=Notification for SciPro
|
||||
hello=Hello
|
||||
autogenerated=This is an auto-generated message from SciPro
|
||||
colon=:
|
||||
comma=,
|
||||
dot=.
|
||||
space=\
|
||||
quote="
|
||||
#Conference
|
||||
conferenceNotification=\ posted on conference
|
||||
conferenceNotificationComment=\ commented on conference
|
||||
#Private message
|
||||
privateMessageNotification=\ wrote a private message to you.
|
||||
#Private message reply
|
||||
privateMessageReplyNotification=\ replied with a private message to you.
|
||||
#Peer accepted
|
||||
acceptPeerReviewSubject=Your request for peer-review has been accepted
|
||||
requestAccepted=Your peer request was accepted by
|
||||
heShe=, he/she now has
|
||||
complete=\ days to complete a review.
|
||||
#Peer completed
|
||||
completedReviewSubject=A peer review has been completed!
|
||||
requestReviewed=Your peer request has now been reviewed and is available.
|
||||
supervisorMessageBody=You are getting this message because you are supervisor of "
|
||||
#Peer completed supervisor of project
|
||||
supervisorMessageBody2=".\nA peer review on this project has been completed and is available for you.
|
||||
#Peer completed supervisor of reviewer
|
||||
supervisorMessageBody3=\ has performed a peer review on someone elses work which is available for you.
|
||||
#Peer completed webnotification
|
||||
inProject=in project:
|
||||
hasPerformed=\ has performed a peer review.
|
||||
commaWithLinebreak=".\n
|
||||
#Peer rated
|
||||
reviewRatedSubject=You have received a rating for a review you have done!
|
||||
reviewRatedBody=Your review has been rated.
|
||||
#Final seminar created
|
||||
finalSeminarCreated=Head supervisor for
|
||||
finalSeminarProject=\ has created a final seminar, room
|
||||
finalSeminarProjectOpponnent=\ has created a final seminar and added you as an opponent, room
|
||||
#Final seminar report uploaded
|
||||
finalSeminarReportUploaded=Thesis for the project
|
||||
finalSeminarReportBeenUploaded=\ has been uploaded.
|
||||
#Final seminar opposition report uploaded
|
||||
finalSeminarOppositionReportUploaded=Opposition-report for the project
|
||||
finalSeminarOppositionReportBeenUploaded=\ has been uploaded by
|
||||
#Final seminar edited
|
||||
finalSeminarOppositionReportEdited=Final seminar for project
|
||||
finalSeminarOppositionReportBeenEdited=\ has been edited.
|
Loading…
x
Reference in New Issue
Block a user