This is an automated email from the ASF dual-hosted git repository.

dyankiv pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


The following commit(s) were added to refs/heads/develop by this push:
     new 53b591bdd temporarily remove image role for termination
     new f42d5629b Merge branch 'develop' of 
https://github.com/apache/incubator-datalab into develop
53b591bdd is described below

commit 53b591bdd292d372886f4e136eb894a904438d21
Author: Denys Yankiv <[email protected]>
AuthorDate: Thu Aug 4 15:04:49 2022 +0300

    temporarily remove image role for termination
---
 .../backendapi/service/impl/ImageExploratoryServiceImpl.java |  2 --
 .../src/main/resources/mongo/general/mongo_roles.json        | 12 ------------
 2 files changed, 14 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ImageExploratoryServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ImageExploratoryServiceImpl.java
index b376e7848..c103fb7c6 100644
--- 
a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ImageExploratoryServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ImageExploratoryServiceImpl.java
@@ -290,10 +290,8 @@ public class ImageExploratoryServiceImpl implements 
ImageExploratoryService {
     public ImageUserPermissions getUserImagePermissions(UserInfo userInfo, 
String imageName, String projectName, String endpoint) {
         boolean canShare;
         boolean canTerminate = false;
-        Optional<ImageInfoRecord> image = 
imageExploratoryDao.getImage(userInfo.getName(), imageName, projectName, 
endpoint);
         if(imageExploratoryDao.getImage(userInfo.getName(), imageName, 
projectName, endpoint).isPresent()){
             canShare = UserRoles.checkAccess(userInfo, RoleType.PAGE, 
SHARE_OWN_IMAGES_PAGE,userInfo.getRoles());
-            canTerminate = UserRoles.checkAccess(userInfo, RoleType.PAGE, 
TERMINATE_OWN_IMAGES_PAGE,userInfo.getRoles());
         } else {
             canShare = UserRoles.checkAccess(userInfo, RoleType.PAGE, 
SHARE_RECEIVED_IMAGES_PAGE,userInfo.getRoles());
         }
diff --git 
a/services/self-service/src/main/resources/mongo/general/mongo_roles.json 
b/services/self-service/src/main/resources/mongo/general/mongo_roles.json
index 7caf8b4ec..fa1e4f1f3 100644
--- a/services/self-service/src/main/resources/mongo/general/mongo_roles.json
+++ b/services/self-service/src/main/resources/mongo/general/mongo_roles.json
@@ -11,18 +11,6 @@
       "$anyuser"
     ]
   },
-  {
-    "_id": "imgTerminateOwnImages",
-    "description": "Allow to terminate own images",
-    "type": "IMAGE",
-    "cloud": "GENERAL",
-    "pages": [
-      "/api/image/delete"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
   {
     "_id": "imgShareAllImages",
     "description": "Allow to share all images",


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to