aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-dao
diff options
context:
space:
mode:
authorAntoine Vigneau <antoine.vigneau@sonarsource.com>2023-10-20 10:42:48 +0200
committersonartech <sonartech@sonarsource.com>2023-10-20 20:02:41 +0000
commitec913a9462215a5d83b05bbc188f7e76d1416041 (patch)
treeb6b47ed67d99b1103b8e526b385e8e92ecdce5cd /server/sonar-db-dao
parentab910ad0535050596cc96d820bd6be91eab9dd9e (diff)
downloadsonarqube-ec913a9462215a5d83b05bbc188f7e76d1416041.tar.gz
sonarqube-ec913a9462215a5d83b05bbc188f7e76d1416041.zip
SONAR-20699 Local projects always apply permissions template
Diffstat (limited to 'server/sonar-db-dao')
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/project/CreationMethod.java24
1 files changed, 15 insertions, 9 deletions
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/project/CreationMethod.java b/server/sonar-db-dao/src/main/java/org/sonar/db/project/CreationMethod.java
index cc9d89b98b4..5f96e42f9e6 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/project/CreationMethod.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/project/CreationMethod.java
@@ -22,20 +22,22 @@ package org.sonar.db.project;
import java.util.Arrays;
public enum CreationMethod {
- UNKNOWN(Category.UNKNOWN, false),
- LOCAL_API(Category.LOCAL, false),
- LOCAL_BROWSER(Category.LOCAL, true),
- ALM_IMPORT_API(Category.ALM_IMPORT, false),
- ALM_IMPORT_BROWSER(Category.ALM_IMPORT, true),
- SCANNER_API(Category.SCANNER, false),
- SCANNER_API_DEVOPS_AUTO_CONFIG(Category.SCANNER, false);
+ UNKNOWN(Category.UNKNOWN, false, true),
+ LOCAL_API(Category.LOCAL, false, true),
+ LOCAL_BROWSER(Category.LOCAL, true, true),
+ ALM_IMPORT_API(Category.ALM_IMPORT, false, false),
+ ALM_IMPORT_BROWSER(Category.ALM_IMPORT, true, false),
+ SCANNER_API(Category.SCANNER, false, true),
+ SCANNER_API_DEVOPS_AUTO_CONFIG(Category.SCANNER, false, false);
- private final boolean isCreatedViaBrowser;
private final Category category;
+ private final boolean isCreatedViaBrowser;
+ private final boolean isLocal;
- CreationMethod(Category category, boolean isCreatedViaBrowser) {
+ CreationMethod(Category category, boolean isCreatedViaBrowser, boolean isLocal) {
this.isCreatedViaBrowser = isCreatedViaBrowser;
this.category = category;
+ this.isLocal = isLocal;
}
public static CreationMethod getCreationMethod(Category category, boolean isBrowserCall) {
@@ -54,5 +56,9 @@ public enum CreationMethod {
return category;
}
+ public boolean isLocal() {
+ return isLocal;
+ }
+
public enum Category {UNKNOWN, LOCAL, ALM_IMPORT, SCANNER}
}