You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ws-permissions.proto 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. // SonarQube, open source software quality management tool.
  2. // Copyright (C) 2008-2016 SonarSource
  3. // mailto:contact AT sonarsource DOT com
  4. //
  5. // SonarQube is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU Lesser General Public
  7. // License as published by the Free Software Foundation; either
  8. // version 3 of the License, or (at your option) any later version.
  9. //
  10. // SonarQube is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. // Lesser General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public License
  16. // along with this program; if not, write to the Free Software Foundation,
  17. // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. syntax = "proto2";
  19. package sonarqube.ws.permissions;
  20. import "ws-commons.proto";
  21. option java_package = "org.sonarqube.ws";
  22. option java_outer_classname = "Permissions";
  23. option optimize_for = SPEED;
  24. // WS api/permissions/template_users for internal use only
  25. message OldUsersWsResponse {
  26. optional sonarqube.ws.commons.Paging paging = 1;
  27. repeated OldUser users = 2;
  28. }
  29. // WS api/permissions/users for internal use only
  30. message UsersWsResponse {
  31. optional sonarqube.ws.commons.Paging paging = 1;
  32. repeated User users = 2;
  33. }
  34. // WS api/permissions/groups for internal use only
  35. message WsGroupsResponse {
  36. optional sonarqube.ws.commons.Paging paging = 1;
  37. repeated Group groups = 2;
  38. }
  39. // WS api/permissions/template_groups for internal use only
  40. message WsTemplateGroupsResponse {
  41. optional sonarqube.ws.commons.Paging paging = 1;
  42. repeated OldGroup groups = 2;
  43. }
  44. message WsSearchGlobalPermissionsResponse {
  45. repeated Permission permissions = 1;
  46. }
  47. message SearchProjectPermissionsWsResponse {
  48. message Project {
  49. optional string id = 1;
  50. optional string key = 2;
  51. optional string qualifier = 3;
  52. optional string name = 4;
  53. repeated Permission permissions = 5;
  54. }
  55. optional sonarqube.ws.commons.Paging paging = 1;
  56. repeated Project projects = 2;
  57. repeated Permission permissions = 3;
  58. }
  59. message CreateTemplateWsResponse {
  60. optional PermissionTemplate permissionTemplate = 1;
  61. }
  62. message UpdateTemplateWsResponse {
  63. optional PermissionTemplate permissionTemplate = 1;
  64. }
  65. message SearchTemplatesWsResponse {
  66. message TemplateIdQualifier {
  67. optional string templateId = 1;
  68. optional string qualifier = 2;
  69. }
  70. repeated PermissionTemplate permissionTemplates = 1;
  71. repeated TemplateIdQualifier defaultTemplates = 2;
  72. repeated Permission permissions = 3;
  73. }
  74. message Permission {
  75. optional string key = 1;
  76. optional string name = 2;
  77. optional string description = 3;
  78. optional int32 usersCount = 4;
  79. optional int32 groupsCount = 5;
  80. optional bool withProjectCreator = 6;
  81. }
  82. message PermissionTemplate {
  83. optional string id = 1;
  84. optional string name = 2;
  85. optional string description = 3;
  86. optional string projectKeyPattern = 4;
  87. // ex: 2015-08-25T16:18:48+0200
  88. optional string createdAt = 5;
  89. // ex: 2015-08-25T16:18:48+0200
  90. optional string updatedAt = 6;
  91. repeated Permission permissions = 7;
  92. }
  93. message OldUser {
  94. optional string login = 1;
  95. optional string name = 2;
  96. optional string email = 3;
  97. optional bool selected = 4;
  98. }
  99. message User {
  100. optional string login = 1;
  101. optional string name = 2;
  102. optional string email = 3;
  103. repeated string permissions = 4;
  104. optional string avatar = 5;
  105. }
  106. message OldGroup {
  107. optional string id = 1;
  108. optional string name = 2;
  109. optional string description = 3;
  110. optional bool selected = 4;
  111. }
  112. message Group {
  113. optional string id = 1;
  114. optional string name = 2;
  115. optional string description = 3;
  116. repeated string permissions = 4;
  117. }