Skip to content
This repository was archived by the owner on Jun 7, 2024. It is now read-only.

Commit 37d905b

Browse files
committed
smaller bugfixes and improvements
1 parent cf7f798 commit 37d905b

File tree

10 files changed

+45
-46
lines changed

10 files changed

+45
-46
lines changed

grails-app/conf/BuildConfig.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ grails.project.dependency.resolution = {
7373
runtime 'mysql:mysql-connector-java:5.1.16'
7474
runtime "net.sourceforge.jtds:jtds:1.3.1" //MS-SQL
7575
compile "org.cloudfoundry:cloudfoundry-runtime:0.8.4"
76-
build 'org.bouncycastle:bcpg-jdk15on:1.50'
77-
build 'org.bouncycastle:bcprov-jdk15on:1.50'
78-
compile "org.docx4j:docx4j-ImportXHTML:3.2.2"
79-
compile "net.sf.jtidy:jtidy:r938"
76+
runtime 'org.bouncycastle:bcpg-jdk15on:1.50'
77+
runtime 'org.bouncycastle:bcprov-jdk15on:1.50'
78+
runtime "org.docx4j:docx4j-ImportXHTML:3.2.2"
79+
runtime "net.sf.jtidy:jtidy:r938"
8080
}
8181

8282
plugins{

grails-app/controllers/LoginController.groovy

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
/*
2-
* Copyright (C) 2013
3-
* Center for Excellence in Nanomedicine (NanoCAN)
4-
* Molecular Oncology
5-
* University of Southern Denmark
6-
* ###############################################
7-
* Written by: Markus List
8-
* Contact: mlist'at'health'.'sdu'.'dk
9-
* Web: http://www.nanocan.org
10-
* ###########################################################################
11-
*
12-
* This file is part of OpenLabFramework.
13-
*
14-
* OpenLabFramework is free software: you can redistribute it and/or modify
15-
* it under the terms of the GNU General Public License as published by
16-
* the Free Software Foundation, either version 3 of the License, or
17-
* (at your option) any later version.
18-
*
19-
* This program is distributed in the hope that it will be useful,
20-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22-
* GNU General Public License for more details.
23-
*
24-
* You should have received a copy of the GNU General Public License
25-
* along with this program. It can be found at the root of the project page.
26-
* If not, see <http://www.gnu.org/licenses/>.
27-
*
28-
* ############################################################################
29-
*/
1+
/*
2+
* Copyright (C) 2013
3+
* Center for Excellence in Nanomedicine (NanoCAN)
4+
* Molecular Oncology
5+
* University of Southern Denmark
6+
* ###############################################
7+
* Written by: Markus List
8+
* Contact: mlist'at'health'.'sdu'.'dk
9+
* Web: http://www.nanocan.org
10+
* ###########################################################################
11+
*
12+
* This file is part of OpenLabFramework.
13+
*
14+
* OpenLabFramework is free software: you can redistribute it and/or modify
15+
* it under the terms of the GNU General Public License as published by
16+
* the Free Software Foundation, either version 3 of the License, or
17+
* (at your option) any later version.
18+
*
19+
* This program is distributed in the hope that it will be useful,
20+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22+
* GNU General Public License for more details.
23+
*
24+
* You should have received a copy of the GNU General Public License
25+
* along with this program. It can be found at the root of the project page.
26+
* If not, see <http://www.gnu.org/licenses/>.
27+
*
28+
* ############################################################################
29+
*/
3030
import grails.converters.JSON
3131

3232
import javax.servlet.http.HttpServletResponse
@@ -95,10 +95,9 @@ class LoginController {
9595
*/
9696
def authAjax = {
9797
// CAS redirect
98-
println "authAjax"
9998
def newParams = params
10099
newParams.bodyOnly = true
101-
redirect(controller: "login", action: "auth", params: newParams)
100+
redirect(controller: "login", action: "auth", params: params)
102101

103102
//response.setHeader 'Location', SpringSecurityUtils.securityConfig.auth.ajaxLoginFormUrl
104103
//response.sendError HttpServletResponse.SC_UNAUTHORIZED

grails-app/controllers/org/openlab/content/DashboardController.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class DashboardController {
4848
}
4949

5050
def dashboard = {
51-
if(!springSecurityService.isLoggedIn()){
51+
if(!springSecurityService?.loggedIn){
5252
redirect(action: "auth", controller: "login", params: [bodyOnly:false])
5353
return
5454
}

modules/OpenLabNotes

src/templates/scaffolding/Controller.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class ${className}Controller {
8484
response.contentType = grailsApplication.config.grails.mime.types[params.format]
8585
response.setHeader("Content-disposition", "attachment; filename=${propertyName}.\${params.extension}")
8686

87-
def notallowed = ["dbName", "springSecurityService", "typeLabel", "beforeInsert", "beforeUpdate"]
87+
def notallowed = ["dbName", "springSecurityService", "typeLabel", "beforeInsert", "beforeUpdate", "methods"]
8888
def fields = new DefaultGrailsDomainClass(${className}.class).persistentProperties.findAll{ !notallowed.contains(it.name) }.collect{it.name}
8989

9090
exportService.export(params.format, response.outputStream, ${propertyName}List, fields?:[], [:], [:], [:])
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<% import grails.persistence.Event %>
22
<%=packageName%>
3-
<% excludedProps = Event.allEvents.toList() << 'version' << 'attachable' << 'id' << 'acl' %>
3+
<% excludedProps = Event.allEvents.toList() << 'version' << 'attachable' << 'id' << 'acl' << 'accessLevel' %>
44
<% historyProps = [] << 'creator' << 'dateCreated' << 'lastModifier' << 'lastUpdated' %>
55

66
<div id="createAdditionalContent"></div>

src/templates/scaffolding/_form.gsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<% import grails.persistence.Event %>
33
44
<% historyProps = [] << 'creator' << 'dateCreated' << 'lastModifier' << 'lastUpdate' %>
5-
<% excludedProps = Event.allEvents.toList() << 'version' << 'dateCreated' << 'lastUpdated' << 'token'
5+
<% excludedProps = Event.allEvents.toList() << 'version' << 'dateCreated' << 'lastUpdated' << 'token' << 'accessLevel' << 'shared'
66
persistentPropNames = domainClass.persistentProperties*.name
77
boolean hasHibernate = pluginManager?.hasGrailsPlugin('hibernate')
88
if (hasHibernate && org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.getMapping(domainClass)?.identity?.generator == 'assigned') {

src/templates/scaffolding/list.gsp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
Results per page: <g:select name="max" value="\${params.max?:10}" from="\${10..100}" class="range"/>
3232
<% if (domainClass.properties.find{ it.name == 'creator'}){%>
3333
Creator: <g:select name="creatorFilter" from="\${org.openlab.security.User.list().collect{it.username}}"
34-
value="\${params.creatorFilter?:''}" noSelection="['':'']"/>
34+
value="\${params.creatorFilter?:''}" noSelection="['':'']" class="select2 many-to-many"/>
3535
<% } %>
3636
<% if (domainClass.properties.find{ it.name == 'lastModifier'}){%>
3737
Last Modifier: <g:select name="lastModifierFilter" from="\${org.openlab.security.User.list().collect{it.username}}"
38-
value="\${params.lastModifierFilter?:''}" noSelection="['':'']"/>
38+
value="\${params.lastModifierFilter?:''}" noSelection="['':'']" class="select2 many-to-many"/>
3939
<% } %>
4040
<% if (domainClass.properties.find{ it.name == 'projects'}){%>
4141
Project: <g:select name="projectFilter" from="\${org.openlab.main.Project.list().collect{it.name}}"
42-
value="\${params.projectFilter?:''}" noSelection="['':'']"/>
42+
value="\${params.projectFilter?:''}" noSelection="['':'']" class="select2 many-to-many"/>
4343
<% } %>
4444
<g:submitButton name="Filter"/>
4545
</g:formRemote>
@@ -49,7 +49,7 @@
4949
<table>
5050
<thead>
5151
<tr>
52-
<% excludedProps = Event.allEvents.toList() << 'id' << 'version'
52+
<% excludedProps = Event.allEvents.toList() << 'id' << 'version' << 'accessLevel' << 'shared'
5353
allowedNames = domainClass.persistentProperties*.name << 'dateCreated' << 'lastUpdated'
5454
props = domainClass.properties.findAll { allowedNames.contains(it.name) && !excludedProps.contains(it.name) && it.type != null && !Collection.isAssignableFrom(it.type) }
5555
Collections.sort(props, comparator.constructors[0].newInstance([domainClass] as Object[]))

src/templates/scaffolding/mobile_show.gsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</g:if>
1717
<div class="ui-grid-a">
1818
<% historyProps = [] << 'creator' << 'dateCreated' << 'lastModifier' << 'lastUpdate' %>
19-
<% excludedProps = Event.allEvents.toList() << 'id' << 'version'
19+
<% excludedProps = Event.allEvents.toList() << 'id' << 'version' << 'accessLevel'
2020
allowedNames = domainClass.persistentProperties*.name
2121
props = domainClass.properties.findAll { allowedNames.contains(it.name) && !excludedProps.contains(it.name) && !historyProps.contains(it.name)}
2222
Collections.sort(props, comparator.constructors[0].newInstance([domainClass] as Object[]))

src/templates/scaffolding/show.gsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</g:if>
2828
<ol class="property-list ${domainClass.propertyName}">
2929
<% historyProps = [] << 'creator' << 'dateCreated' << 'lastModifier' << 'lastUpdate' %>
30-
<% excludedProps = Event.allEvents.toList() << 'id' << 'version'
30+
<% excludedProps = Event.allEvents.toList() << 'id' << 'version' << 'accessLevel' << 'shared'
3131
allowedNames = domainClass.persistentProperties*.name
3232
props = domainClass.properties.findAll { allowedNames.contains(it.name) && !excludedProps.contains(it.name) && !historyProps.contains(it.name)}
3333
Collections.sort(props, comparator.constructors[0].newInstance([domainClass] as Object[]))

0 commit comments

Comments
 (0)