Skip to content

Commit

Permalink
allow opening read-only campaigns in the authoring tool
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Jan 4, 2016
1 parent 08525a6 commit 76b6770
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/app.js
Expand Up @@ -76,13 +76,16 @@
if(count < 0){
e.preventDefault();
message("Loading campaign info, please be patient.", "info")
} else if(!user_is_admin && $.inArray("author", roles) < 0 && $.inArray("supervisor", roles) < 0) {
}
/*** We now allow for read-only use of the author tool
else if(!user_is_admin && $.inArray("author", roles) < 0 && $.inArray("supervisor", roles) < 0) {
e.preventDefault()
message("You do not have permission to modify campaign <strong>" + urn + "</strong>.")
} else if(count > 0){
e.preventDefault();
message("Campaign <strong>" + urn + "</strong> has existing responses and can therefore not be modified.")
}
*/
});

var a4 = $("<a />").appendTo($("<li />").appendTo(ul)).append('<span class="glyphicon glyphicon-floppy-save"></span> Download XML').attr("href", "#").click(function(e){
Expand Down

0 comments on commit 76b6770

Please sign in to comment.