diff options
Diffstat (limited to 'portal-BE/src/main/java/org/onap/portal/service/userRole/FnUserRoleService.java')
-rw-r--r-- | portal-BE/src/main/java/org/onap/portal/service/userRole/FnUserRoleService.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/portal-BE/src/main/java/org/onap/portal/service/userRole/FnUserRoleService.java b/portal-BE/src/main/java/org/onap/portal/service/userRole/FnUserRoleService.java index eb7ece2b..86ee03fb 100644 --- a/portal-BE/src/main/java/org/onap/portal/service/userRole/FnUserRoleService.java +++ b/portal-BE/src/main/java/org/onap/portal/service/userRole/FnUserRoleService.java @@ -474,6 +474,11 @@ public class FnUserRoleService { fnUserRoleDao.deleteById(id); } + public void deleteByUserIdAndRoleId(final Long userId, final String roleId){ + final String query = "DELETE FROM FnUserRole id = :userId AND roleId.id = :roleId"; + entityManager.createQuery(query).setParameter("userId", userId).setParameter("roleId", roleId).executeUpdate(); + } + public List<RoleInAppForUser> constructRolesInAppForUserGet(List<Role> appRoles, FnRole[] userAppRoles, Boolean extRequestValue) { List<RoleInAppForUser> rolesInAppForUser = new ArrayList<>(); |