--- /dev/null
+{
+ "permissions": [
+ {
+ "key": "admin",
+ "name": "Administer System",
+ "description": "Ability to perform all administration functions for the instance: global configuration and personalization of default dashboards.",
+ "usersCount": 0,
+ "groupsCount": 1
+ },
+ {
+ "key": "profileadmin",
+ "name": "Administer Quality Profiles",
+ "description": "Ability to perform any action on the quality profiles.",
+ "usersCount": 2,
+ "groupsCount": 0
+ },
+ {
+ "key": "gateadmin",
+ "name": "Administer Quality Gates",
+ "description": "Ability to perform any action on the quality gates.",
+ "usersCount": 2,
+ "groupsCount": 0
+ },
+ {
+ "key": "shareDashboard",
+ "name": "Share Dashboards And Filters",
+ "description": "Ability to share dashboards, issue filters and measure filters.",
+ "usersCount": 0,
+ "groupsCount": 1
+ },
+ {
+ "key": "scan",
+ "name": "Execute Analysis",
+ "description": "Ability to execute analyses, and to get all settings required to perform the analysis, even the secured ones like the scm account password, the jira account password, and so on.",
+ "usersCount": 0,
+ "groupsCount": 2
+ },
+ {
+ "key": "dryRunScan",
+ "name": "Execute Preview Analysis",
+ "description": "Ability to execute preview analysis (results are not pushed to the server). This permission does not include the ability to access secured settings such as the scm account password, the jira account password, and so on. This permission is required to execute preview analysis in Eclipse or via the Issues Report plugin.",
+ "usersCount": 2,
+ "groupsCount": 0
+ },
+ {
+ "key": "provisioning",
+ "name": "Provision Projects",
+ "description": "Ability to initialize project structure before first analysis.",
+ "usersCount": 1,
+ "groupsCount": 1
+ }
+ ]
+}
+
+
+
--- /dev/null
+{
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 25,
+ "total": 4
+ },
+ "projects": [
+ {
+ "id": "0bd7b1e7-91d6-439e-a607-4a3a9aad3c6a",
+ "key": "net.java.openjdk:jdk7",
+ "name": "JDK 7",
+ "qualifier": "TRK",
+ "permissions": [
+ {
+ "key": "admin",
+ "usersCount": 3,
+ "groupsCount": 4
+ },
+ {
+ "key": "issueadmin",
+ "usersCount": 1,
+ "groupsCount": 0
+ }
+ ]
+ },
+ {
+ "id": "ce4c03d6-430f-40a9-b777-ad877c00aa4d",
+ "key": "clang",
+ "name": "Clang",
+ "qualifier": "TRK",
+ "permissions": [
+ {
+ "key": "issueadmin",
+ "usersCount": 1,
+ "groupsCount": 0
+ }
+ ]
+ },
+ {
+ "id": "4e607bf9-7ed0-484a-946d-d58ba7dab2fb",
+ "key": "simon-brandhof",
+ "name": "Simon Brandhof",
+ "qualifier": "DEV",
+ "permissions": [
+ {
+ "key": "admin",
+ "usersCount": 0,
+ "groupsCount": 1
+ },
+ {
+ "key": "issueadmin",
+ "usersCount": 1,
+ "groupsCount": 0
+ }
+ ]
+ },
+ {
+ "id": "752d8bfd-420c-4a83-a4e5-8ab19b13c8fc",
+ "key": "Java",
+ "name": "Java",
+ "qualifier": "VW",
+ "permissions": [
+ {
+ "key": "admin",
+ "usersCount": 0,
+ "groupsCount": 1
+ },
+ {
+ "key": "issueadmin",
+ "usersCount": 1,
+ "groupsCount": 0
+ }
+ ]
+ }
+ ],
+ "permissions": [
+ {
+ "key": "user",
+ "name": "Browse",
+ "description": "Ability to access a project, browse its measures, and create/edit issues for it."
+ },
+ {
+ "key": "admin",
+ "name": "Administer",
+ "description": "Ability to access project settings and perform administration tasks. (Users will also need \"Browse\" permission)"
+ },
+ {
+ "key": "issueadmin",
+ "name": "Administer Issues",
+ "description": "Grants the permission to perform advanced editing on issues: marking an issue False Positive / Won\u0027t Fix or changing an Issue\u0027s severity. (Users will also need \"Browse\" permission)"
+ },
+ {
+ "key": "codeviewer",
+ "name": "See Source Code",
+ "description": "Ability to view the project\u0027s source code. (Users will also need \"Browse\" permission)"
+ }
+ ]
+}
--- /dev/null
+{
+ "permissionTemplates": [
+ {
+ "id": "AU-TpxcA-iU5OvuD2FL0",
+ "name": "Default template for Developers",
+ "projectKeyPattern": ".*sonar.developer.*",
+ "createdAt": "2004-11-15T07:26:40+0100",
+ "updatedAt": "2004-11-19T22:33:20+0100",
+ "permissions": [
+ {
+ "key": "user",
+ "usersCount": 0,
+ "groupsCount": 1
+ }
+ ]
+ },
+ {
+ "id": "AU-Tpxb--iU5OvuD2FLy",
+ "name": "Default template for Projects",
+ "description": "Template for new projects",
+ "createdAt": "2001-09-09T03:46:40+0200",
+ "updatedAt": "2001-09-09T03:46:40+0200",
+ "permissions": [
+ {
+ "key": "admin",
+ "usersCount": 0,
+ "groupsCount": 1
+ },
+ {
+ "key": "codeviewer",
+ "usersCount": 1,
+ "groupsCount": 0
+ },
+ {
+ "key": "issueadmin",
+ "usersCount": 3,
+ "groupsCount": 0
+ }
+ ]
+ },
+ {
+ "id": "AU-TpxcA-iU5OvuD2FLz",
+ "name": "Default template for Views",
+ "description": "Template for new views",
+ "projectKeyPattern": ".*sonar.views.*",
+ "createdAt": "2001-09-09T03:46:40+0200",
+ "updatedAt": "2004-11-09T12:33:20+0100",
+ "permissions": [
+ {
+ "key": "issueadmin",
+ "usersCount": 0,
+ "groupsCount": 3
+ },
+ {
+ "key": "user",
+ "usersCount": 2,
+ "groupsCount": 0
+ }
+ ]
+ }
+ ],
+ "defaultTemplates": [
+ {
+ "templateId": "AU-Tpxb--iU5OvuD2FLy",
+ "qualifier": "TRK"
+ },
+ {
+ "templateId": "AU-TpxcA-iU5OvuD2FLz",
+ "qualifier": "VW"
+ },
+ {
+ "templateId": "AU-TpxcA-iU5OvuD2FL0",
+ "qualifier": "DEV"
+ }
+ ]
+}
String result = ws.newRequest().execute().getInput();
- assertJson(result).isSimilarTo(getClass().getResource("SearchGlobalPermissionsActionTest/search_global_permissions-example.json"));
+ assertJson(result).isSimilarTo(getClass().getResource("search_global_permissions-example.json"));
}
@Test
assertJson(result)
.ignoreFields("permissions")
- .isSimilarTo(getClass().getResource("SearchProjectPermissionsActionTest/search_project_permissions-example.json"));
+ .isSimilarTo(getClass().getResource("search_project_permissions-example.json"));
}
@Test
assertJson(result)
.withStrictArrayOrder()
.ignoreFields("permissions")
- .isSimilarTo(getClass().getResource("SearchTemplatesActionTest/search_templates-example.json"));
+ .isSimilarTo(getClass().getResource("search_templates-example.json"));
}
@Test
+++ /dev/null
-{
- "permissions": [
- {
- "key": "admin",
- "name": "Administer System",
- "description": "Ability to perform all administration functions for the instance: global configuration and personalization of default dashboards.",
- "usersCount": 0,
- "groupsCount": 1
- },
- {
- "key": "profileadmin",
- "name": "Administer Quality Profiles",
- "description": "Ability to perform any action on the quality profiles.",
- "usersCount": 2,
- "groupsCount": 0
- },
- {
- "key": "gateadmin",
- "name": "Administer Quality Gates",
- "description": "Ability to perform any action on the quality gates.",
- "usersCount": 2,
- "groupsCount": 0
- },
- {
- "key": "shareDashboard",
- "name": "Share Dashboards And Filters",
- "description": "Ability to share dashboards, issue filters and measure filters.",
- "usersCount": 0,
- "groupsCount": 1
- },
- {
- "key": "scan",
- "name": "Execute Analysis",
- "description": "Ability to execute analyses, and to get all settings required to perform the analysis, even the secured ones like the scm account password, the jira account password, and so on.",
- "usersCount": 0,
- "groupsCount": 2
- },
- {
- "key": "dryRunScan",
- "name": "Execute Preview Analysis",
- "description": "Ability to execute preview analysis (results are not pushed to the server). This permission does not include the ability to access secured settings such as the scm account password, the jira account password, and so on. This permission is required to execute preview analysis in Eclipse or via the Issues Report plugin.",
- "usersCount": 2,
- "groupsCount": 0
- },
- {
- "key": "provisioning",
- "name": "Provision Projects",
- "description": "Ability to initialize project structure before first analysis.",
- "usersCount": 1,
- "groupsCount": 1
- }
- ]
-}
-
-
-
+++ /dev/null
-{
- "paging": {
- "pageIndex": 1,
- "pageSize": 25,
- "total": 4
- },
- "projects": [
- {
- "id": "0bd7b1e7-91d6-439e-a607-4a3a9aad3c6a",
- "key": "net.java.openjdk:jdk7",
- "name": "JDK 7",
- "qualifier": "TRK",
- "permissions": [
- {
- "key": "admin",
- "usersCount": 3,
- "groupsCount": 4
- },
- {
- "key": "issueadmin",
- "usersCount": 1,
- "groupsCount": 0
- }
- ]
- },
- {
- "id": "ce4c03d6-430f-40a9-b777-ad877c00aa4d",
- "key": "clang",
- "name": "Clang",
- "qualifier": "TRK",
- "permissions": [
- {
- "key": "issueadmin",
- "usersCount": 1,
- "groupsCount": 0
- }
- ]
- },
- {
- "id": "4e607bf9-7ed0-484a-946d-d58ba7dab2fb",
- "key": "simon-brandhof",
- "name": "Simon Brandhof",
- "qualifier": "DEV",
- "permissions": [
- {
- "key": "admin",
- "usersCount": 0,
- "groupsCount": 1
- },
- {
- "key": "issueadmin",
- "usersCount": 1,
- "groupsCount": 0
- }
- ]
- },
- {
- "id": "752d8bfd-420c-4a83-a4e5-8ab19b13c8fc",
- "key": "Java",
- "name": "Java",
- "qualifier": "VW",
- "permissions": [
- {
- "key": "admin",
- "usersCount": 0,
- "groupsCount": 1
- },
- {
- "key": "issueadmin",
- "usersCount": 1,
- "groupsCount": 0
- }
- ]
- }
- ],
- "permissions": [
- {
- "key": "user",
- "name": "Browse",
- "description": "Ability to access a project, browse its measures, and create/edit issues for it."
- },
- {
- "key": "admin",
- "name": "Administer",
- "description": "Ability to access project settings and perform administration tasks. (Users will also need \"Browse\" permission)"
- },
- {
- "key": "issueadmin",
- "name": "Administer Issues",
- "description": "Grants the permission to perform advanced editing on issues: marking an issue False Positive / Won\u0027t Fix or changing an Issue\u0027s severity. (Users will also need \"Browse\" permission)"
- },
- {
- "key": "codeviewer",
- "name": "See Source Code",
- "description": "Ability to view the project\u0027s source code. (Users will also need \"Browse\" permission)"
- }
- ]
-}
+++ /dev/null
-{
- "permissionTemplates": [
- {
- "id": "AU-TpxcA-iU5OvuD2FL0",
- "name": "Default template for Developers",
- "projectKeyPattern": ".*sonar.developer.*",
- "createdAt": "2004-11-15T07:26:40+0100",
- "updatedAt": "2004-11-19T22:33:20+0100",
- "permissions": [
- {
- "key": "user",
- "usersCount": 0,
- "groupsCount": 1
- }
- ]
- },
- {
- "id": "AU-Tpxb--iU5OvuD2FLy",
- "name": "Default template for Projects",
- "description": "Template for new projects",
- "createdAt": "2001-09-09T03:46:40+0200",
- "updatedAt": "2001-09-09T03:46:40+0200",
- "permissions": [
- {
- "key": "admin",
- "usersCount": 0,
- "groupsCount": 1
- },
- {
- "key": "codeviewer",
- "usersCount": 1,
- "groupsCount": 0
- },
- {
- "key": "issueadmin",
- "usersCount": 3,
- "groupsCount": 0
- }
- ]
- },
- {
- "id": "AU-TpxcA-iU5OvuD2FLz",
- "name": "Default template for Views",
- "description": "Template for new views",
- "projectKeyPattern": ".*sonar.views.*",
- "createdAt": "2001-09-09T03:46:40+0200",
- "updatedAt": "2004-11-09T12:33:20+0100",
- "permissions": [
- {
- "key": "issueadmin",
- "usersCount": 0,
- "groupsCount": 3
- },
- {
- "key": "user",
- "usersCount": 2,
- "groupsCount": 0
- }
- ]
- }
- ],
- "defaultTemplates": [
- {
- "templateId": "AU-Tpxb--iU5OvuD2FLy",
- "qualifier": "TRK"
- },
- {
- "templateId": "AU-TpxcA-iU5OvuD2FLz",
- "qualifier": "VW"
- },
- {
- "templateId": "AU-TpxcA-iU5OvuD2FL0",
- "qualifier": "DEV"
- }
- ]
-}