Skip to content

Commit 9c1566d

Browse files
committed
Merge remote-tracking branch 'origin/develop' into fb_remove_advanced_import
2 parents fcb551e + 6df099e commit 9c1566d

609 files changed

Lines changed: 32410 additions & 9629 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/branch_release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
tags:
99
- '*'
1010

11+
permissions:
12+
pull-requests: write
13+
contents: write
14+
1115
jobs:
1216
branch_release:
1317
if: github.event.created && github.event.sender.login == 'labkey-teamcity'

.github/workflows/merge_release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
types:
99
- submitted
1010

11+
permissions:
12+
pull-requests: write
13+
contents: write
14+
1115
jobs:
1216
merge_release:
1317
if: >

.github/workflows/validate_pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- reopened
1111
- ready_for_review
1212

13+
permissions:
14+
pull-requests: write
15+
1316
jobs:
1417
validate_pr:
1518
if: github.event.pull_request.head.repo.owner.login == 'LabKey'

build.gradle

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ project.dependencies {
2626
implementation("commons-io:commons-io:${commonsIoVersion}")
2727
implementation("com.fasterxml.jackson.core:jackson-annotations:${jacksonAnnotationsVersion}")
2828
implementation("org.bouncycastle:bcprov-jdk18on:${bouncycastleVersion}")
29+
implementation("org.apache.commons:commons-csv:${apacheCommonsCsvVersion}")
2930

3031
//api "org.seleniumhq.selenium:selenium-server:${seleniumVersion}"
3132
implementation("org.seleniumhq.selenium:selenium-firefox-driver:${seleniumVersion}")
@@ -124,32 +125,23 @@ if (!BuildUtils.isIntellij()) {
124125
}
125126
}
126127

127-
def initPropertiesTask = project.tasks.register("initProperties", Task) {
128-
Task task ->
128+
def initPropertiesTask = project.tasks.register("initProperties", Copy) {
129+
Copy task ->
129130
task.group = GroupNames.TEST
130131
task.description = "Create test.properties if missing"
131-
task.doLast({
132-
File testProperties = project.file('test.properties')
133-
File testPropertiesTemplate = project.file('test.properties.template')
134-
135-
if (!testProperties.exists())
136-
{
137-
project.copy {
138-
CopySpec copy ->
139-
copy.from(testPropertiesTemplate)
140-
copy.into(project.file("."))
141-
copy.rename(testPropertiesTemplate.getName(), testProperties.getName())
142-
copy.filter { String line ->
143-
if (line.startsWith("#!!")) {
144-
return null
145-
}
146-
else {
147-
return line
148-
}
149-
}
150-
}
132+
task.from(project.file('test.properties.template'))
133+
task.into(".")
134+
task.outputs.files(project.file('test.properties'))
135+
task.rename('test.properties.template', 'test.properties')
136+
task.filter { String line ->
137+
if (line.startsWith("#!!")) {
138+
return null
151139
}
152-
})
140+
else {
141+
return line
142+
}
143+
}
144+
task.onlyIf{ !project.file('test.properties').exists() }
153145
}
154146

155147
project.tasks.register("convertHarToStressXml", JavaExec) {

buildTestModules/communityArtifacts/src/org/labkey/communityartifacts/CommunityArtifactsController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class BeginAction extends SimpleViewAction
4040
{
4141
public ModelAndView getView(Object o, BindException errors)
4242
{
43-
return new JspView("/org/labkey/communityartifacts/view/hello.jsp");
43+
return new JspView<>("/org/labkey/communityartifacts/view/hello.jsp");
4444
}
4545

4646
@Override

buildTestModules/starterArtifacts/src/org/labkey/starterartifacts/StarterArtifactsController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class BeginAction extends SimpleViewAction
4040
{
4141
public ModelAndView getView(Object o, BindException errors)
4242
{
43-
return new JspView("/org/labkey/starterartifacts/view/hello.jsp");
43+
return new JspView<>("/org/labkey/starterartifacts/view/hello.jsp");
4444
}
4545

4646
@Override
-14 Bytes
Binary file not shown.

data/api/buttonCustomizationEcho.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
<script type="text/javascript">
44
var html = "";
55
var parameters = LABKEY.ActionURL.getParameters();
6+
let paramsEl = document.getElementById("params");
67
for (var p in parameters) {
78
if (parameters.hasOwnProperty(p)) {
8-
html += p + ": " + parameters[p] + "<br>";
9+
paramsEl.append(document.createTextNode(p + ": " + parameters[p]));
10+
paramsEl.append(document.createElement("br"));
911
}
1012
}
11-
document.getElementById("params").innerHTML = html;
1213
</script>

data/api/rlabkey-api-webdav.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,23 @@
3535
]]>
3636
</response>
3737
</test>
38+
<test name="webdav.get showProgressBar=TRUE" type="post">
39+
<url>
40+
<![CDATA[
41+
library(Rlabkey)
42+
c("file.exists", file.exists("%downloadDir%/testFile.txt"))
43+
c("webdav.get", labkey.webdav.get(baseUrl=labkey.url.base, folderPath="%projectName%", remoteFilePath="remote/readChecks/getMe.txt", localFilePath="%downloadDir%/testFile.txt", showProgressBar=TRUE))
44+
c("final size", file.info("%downloadDir%/testFile.txt")$size)
45+
]]>
46+
</url>
47+
<response>
48+
<![CDATA[
49+
[1] "file.exists" "FALSE"
50+
[1] "webdav.get" "TRUE"
51+
[1] "final size" "5"
52+
]]>
53+
</response>
54+
</test>
3855
<test name="webdav.get overwrite=FALSE" type="post">
3956
<url>
4057
<![CDATA[

data/api/security-api.xml

Lines changed: 66 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ApiTests xmlns="http://labkey.org/query/xml">
22

33
<test name="get group permissions" type="get">
4-
<url>Security%20API%20Test%20Project/security-getGroupPerms.view?</url>
4+
<url>Security%20API%20Test%20Project/security-getGroupPerms.api</url>
55
<response>
66
{"container":
77
{
@@ -10,26 +10,6 @@
1010
"path": "/Security API Test Project",
1111
"isInheritingPerms": false,
1212
"groups": [
13-
{
14-
"id": -1,
15-
"name": "Site Administrators",
16-
"roles": [],
17-
"isSystemGroup": true,
18-
"isProjectGroup": false,
19-
"type": "g",
20-
"effectivePermissions": [],
21-
"groups": []
22-
},
23-
{
24-
"isSystemGroup": true,
25-
"roles": [],
26-
"name": "Developers",
27-
"effectivePermissions": [],
28-
"groups": [],
29-
"id": -4,
30-
"type": "g",
31-
"isProjectGroup": false,
32-
},
3313
{
3414
"id": -3,
3515
"name": "Guests",
@@ -113,8 +93,71 @@
11393
</response>
11494
</test>
11595

96+
<test name="get group permissions excluding groups without effective permissions" type="get">
97+
<url>Security%20API%20Test%20Project/security-getGroupPerms.api?includeEmptyPermGroups=false</url>
98+
<response>
99+
{"container":
100+
{
101+
"id": "THIS CONTAINER GUID FIELD IS IGNORED IN JSON CHECK",
102+
"name": "Security API Test Project",
103+
"path": "/Security API Test Project",
104+
"isInheritingPerms": false,
105+
"groups": [
106+
{
107+
"id": 1672,
108+
"name": "testgroup1",
109+
"roles": ["org.labkey.api.security.roles.EditorRole"],
110+
"isSystemGroup": false,
111+
"isProjectGroup": true,
112+
"type": "g",
113+
"effectivePermissions": [
114+
"org.labkey.api.security.permissions.InsertPermission",
115+
"org.labkey.api.security.permissions.DeletePermission",
116+
"org.labkey.api.security.permissions.EditSharedViewPermission",
117+
"org.labkey.api.reports.permissions.EditSharedReportPermission",
118+
"org.labkey.api.security.permissions.ReadPermission",
119+
"org.labkey.api.reports.permissions.ShareReportPermission",
120+
"org.labkey.api.study.permissions.SharedParticipantGroupPermission",
121+
"org.labkey.announcements.model.SecureMessageBoardRespondPermission",
122+
"org.labkey.api.security.permissions.ReadSomePermission",
123+
"org.labkey.api.lists.permissions.ManagePicklistsPermission",
124+
"org.labkey.api.security.permissions.UpdatePermission",
125+
"org.labkey.announcements.model.SecureMessageBoardReadPermission",
126+
"org.labkey.api.security.permissions.SampleWorkflowDeletePermission",
127+
"org.labkey.api.security.permissions.SampleWorkflowJobPermission",
128+
"org.labkey.api.security.permissions.AssayReadPermission",
129+
"org.labkey.api.security.permissions.NotebookReadPermission",
130+
"org.labkey.api.security.permissions.DataClassReadPermission",
131+
"org.labkey.api.security.permissions.MediaReadPermission",
132+
"org.labkey.api.security.permissions.MoveEntitiesPermission",
133+
],
134+
"groups": []
135+
},
136+
{
137+
"id": 1673,
138+
"name": "testgroup2",
139+
"roles": ["org.labkey.api.security.roles.ReaderRole"],
140+
"isSystemGroup": false,
141+
"isProjectGroup": true,
142+
"type": "g",
143+
"effectivePermissions": [
144+
"org.labkey.api.security.permissions.ReadPermission",
145+
"org.labkey.api.security.permissions.ReadSomePermission",
146+
"org.labkey.api.security.permissions.AssayReadPermission",
147+
"org.labkey.api.security.permissions.DataClassReadPermission",
148+
"org.labkey.api.security.permissions.NotebookReadPermission",
149+
"org.labkey.api.security.permissions.MediaReadPermission"
150+
],
151+
"groups": []
152+
}
153+
]
154+
}
155+
}
156+
</response>
157+
</test>
158+
116159
<test name="groups for current user" type="get">
117-
<url>Security%20Api%20Test%20Project/security-getGroupsForCurrentUser.view?</url>
160+
<url>Security%20Api%20Test%20Project/security-getGroupsForCurrentUser.api</url>
118161
<response>
119162
{"groups": [
120163
{
@@ -128,20 +171,14 @@
128171
"name": "All Site Users",
129172
"isSystemGroup": true,
130173
"isProjectGroup": false
131-
},
132-
{
133-
"id": -1,
134-
"name": "Site Administrators",
135-
"isSystemGroup": true,
136-
"isProjectGroup": false
137174
}
138175
]
139176
}
140177
</response>
141178
</test>
142179

143180
<test name="ensure login" type="get">
144-
<url>Security%20Api%20Test%20Project/security-ensureLogin.view?</url>
181+
<url>Security%20Api%20Test%20Project/security-ensureLogin.api</url>
145182
<response>
146183
{"currentUser":
147184
{

0 commit comments

Comments
 (0)