Skip to content

Commit 1327d98

Browse files
committed
Removed wildcard permissions from permission schema.
Permissions schema MUST be entity specific, not global otherwise deleting a single entity will delete the global permission.
1 parent 84422db commit 1327d98

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

src/main/java/org/ohdsi/webapi/security/model/ConceptSetPermissionSchema.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,14 @@ public class ConceptSetPermissionSchema extends EntityPermissionSchema {
1111
private static Map<String, String> writePermissions = new HashMap<String, String>() {{
1212
put("conceptset:%s:put", "Update Concept Set with ID = %s");
1313
put("conceptset:%s:items:put", "Update Items of Concept Set with ID = %s");
14-
put("conceptset:*:annotation:put", "Create Concept Set Annotation");
1514
put("conceptset:%s:annotation:*:delete", "Delete Annotations of Concept Set with ID = %s");
16-
put("conceptset:*:annotation:*:delete", "Delete Annotations of any Concept Set");
1715
put("conceptset:%s:delete", "Delete Concept Set with ID = %s");
1816
}};
1917

2018
private static Map<String, String> readPermissions = new HashMap<String, String>() {{
2119
put("conceptset:%s:get", "view conceptset definition with id %s");
2220
put("conceptset:%s:expression:get", "Resolve concept set %s expression");
2321
put("conceptset:%s:annotation:get", "Resolve concept set annotations");
24-
put("conceptset:*:annotation:get", "Resolve concept set annotations");
2522
put("conceptset:%s:version:*:expression:get", "Get expression for concept set %s items for default source");
2623
}};
2724

src/main/java/org/ohdsi/webapi/security/model/PathwayAnalysisPermissionSchema.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ public class PathwayAnalysisPermissionSchema extends EntityPermissionSchema {
1717
private static Map<String, String> readPermissions = new HashMap<String, String>() {{
1818
put("pathway-analysis:%s:get", "Get Pathways Analysis instance");
1919
put("pathway-analysis:%s:generation:get", "Get Pathways Analysis generations list");
20-
put("pathway-analysis:generation:*:get", "Get Pathways Analysis generation instance");
21-
put("pathway-analysis:generation:*:result:get", "Get Pathways Analysis generation results");
22-
put("pathway-analysis:generation:*:design:get", "Get Pathways Analysis generation design");
2320
put("pathway-analysis:%s:version:get", "Get list of pathway analysis versions");
2421
put("pathway-analysis:%s:version:*:get", "Get pathway analysis version");
2522
}

0 commit comments

Comments
 (0)