Revert OAuth2 scopes for member roles;
Change-Id: Ic0340cce54a06121571a82edbfbccd7b14cf9a1d
diff --git a/src/main/java/de/ids_mannheim/korap/constant/OAuth2Scope.java b/src/main/java/de/ids_mannheim/korap/constant/OAuth2Scope.java
index 5319d46..c37a471 100644
--- a/src/main/java/de/ids_mannheim/korap/constant/OAuth2Scope.java
+++ b/src/main/java/de/ids_mannheim/korap/constant/OAuth2Scope.java
@@ -25,7 +25,7 @@
DELETE_USER_GROUP_MEMBER, ADD_USER_GROUP_MEMBER,
- ADD_MEMBER_ROLE, DELETE_MEMBER_ROLE,
+ ADD_USER_GROUP_MEMBER_ROLE, DELETE_USER_GROUP_MEMBER_ROLE,
CREATE_VC, VC_INFO, EDIT_VC, DELETE_VC,
diff --git a/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java b/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
index 881dbc9..a968946 100644
--- a/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
+++ b/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
@@ -282,7 +282,7 @@
.getUserPrincipal();
try {
scopeService.verifyScope(context,
- OAuth2Scope.ADD_MEMBER_ROLE);
+ OAuth2Scope.ADD_USER_GROUP_MEMBER_ROLE);
service.addAdminRole(context.getUsername(), groupName,
memberUsername);
return Response.ok().build();
@@ -318,7 +318,7 @@
.getUserPrincipal();
try {
scopeService.verifyScope(context,
- OAuth2Scope.DELETE_MEMBER_ROLE);
+ OAuth2Scope.DELETE_USER_GROUP_MEMBER_ROLE);
if (roleIds != null && !roleIds.isEmpty()){
throw kustvaktResponseHandler.throwit(new KustvaktException(
StatusCodes.DEPRECATED,