mirror of
https://github.com/valitydev/org-manager.git
synced 2024-11-06 00:15:23 +00:00
[TD-152] Bump service and add metrics
This commit is contained in:
parent
5cab4a9150
commit
b32146ac11
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,4 +0,0 @@
|
||||
[submodule "build_utils"]
|
||||
path = build_utils
|
||||
url = git@github.com:rbkmoney/build_utils.git
|
||||
branch = master
|
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@ -1,15 +0,0 @@
|
||||
#!groovy
|
||||
build('org-manager', 'java-maven') {
|
||||
checkoutRepo()
|
||||
loadBuildUtils()
|
||||
|
||||
def javaServicePipeline
|
||||
runStage('load JavaService pipeline') {
|
||||
javaServicePipeline = load("build_utils/jenkins_lib/pipeJavaServiceInsideDocker.groovy")
|
||||
}
|
||||
|
||||
def serviceName = env.REPO_NAME
|
||||
def mvnArgs = '-DjvmArgs="-Xmx256m"'
|
||||
|
||||
javaServicePipeline(serviceName, mvnArgs)
|
||||
}
|
@ -1 +0,0 @@
|
||||
Subproject commit be44d69fc87b22a0bb82d98d6eae7658d1647f98
|
37
pom.xml
37
pom.xml
@ -4,9 +4,9 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>service-parent-pom</artifactId>
|
||||
<version>2.0.11</version>
|
||||
<version>1.0.9</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>org-manager</artifactId>
|
||||
@ -22,7 +22,6 @@
|
||||
<server.rest.port>8080</server.rest.port>
|
||||
<management.port>8023</management.port>
|
||||
<exposed.ports>${server.port} ${server.rest.port} ${management.port}</exposed.ports>
|
||||
<dockerfile.registry>${env.REGISTRY}</dockerfile.registry>
|
||||
<spring-security.version>5.5.2</spring-security.version>
|
||||
<keycloak.version>14.0.0</keycloak.version>
|
||||
<schedlock.version>4.14.0</schedlock.version>
|
||||
@ -32,46 +31,46 @@
|
||||
<dependencies>
|
||||
<!--rbkmoney-->
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<artifactId>spring-boot-starter-metrics-statsd</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<artifactId>custom-actuator-endpoints</artifactId>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-registry-prometheus</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney.woody</groupId>
|
||||
<groupId>dev.vality.woody</groupId>
|
||||
<artifactId>woody-thrift</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>shared-resources</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>swag-organizations</artifactId>
|
||||
<version>${swag.organizations.version}</version>
|
||||
<version>1.1-bb2f2f5-server</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>damsel</artifactId>
|
||||
<version>1.544-dcd92dd</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>org-management-proto</artifactId>
|
||||
<version>1.2-06c5c84</version>
|
||||
<version>1.6-abb4b4d</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>bouncer-proto</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>bouncer-proto</artifactId>
|
||||
<version>1.20-7dee26e</version>
|
||||
<version>1.36-96bd74d</version>
|
||||
</dependency>
|
||||
<!--spring-->
|
||||
<dependency>
|
||||
@ -280,7 +279,7 @@
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<resourceBundles>
|
||||
<resourceBundle>com.rbkmoney:shared-resources:${shared-resources.version}</resourceBundle>
|
||||
<resourceBundle>dev.vality:shared-resources:${shared-resources.version}</resourceBundle>
|
||||
</resourceBundles>
|
||||
<attachToMain>false</attachToMain>
|
||||
<attachToTest>false</attachToTest>
|
||||
|
@ -1,8 +0,0 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.orgmanager.service.dto.BouncerContextDto;
|
||||
|
||||
public interface BouncerService {
|
||||
|
||||
boolean havePrivileges(BouncerContextDto bouncerContext);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.MemberRoleEntity;
|
||||
import com.rbkmoney.swag.organizations.model.MemberRole;
|
||||
|
||||
public interface MemberRoleService {
|
||||
|
||||
MemberRole findById(String id);
|
||||
|
||||
MemberRoleEntity findEntityById(String id);
|
||||
|
||||
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.orgmanager.service.model.UserInfo;
|
||||
|
||||
public interface UserService {
|
||||
|
||||
UserInfo findById(String id);
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager;
|
||||
package dev.vality.orgmanager;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
@ -1,8 +1,8 @@
|
||||
package com.rbkmoney.orgmanager.config;
|
||||
package dev.vality.orgmanager.config;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.rbkmoney.orgmanager.controller.converter.InvitationStatusConverter;
|
||||
import dev.vality.orgmanager.controller.converter.InvitationStatusConverter;
|
||||
import org.openapitools.jackson.nullable.JsonNullableModule;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.orgmanager.config;
|
||||
package dev.vality.orgmanager.config;
|
||||
|
||||
import com.rbkmoney.bouncer.decisions.ArbiterSrv;
|
||||
import com.rbkmoney.woody.thrift.impl.http.THSpawnClientBuilder;
|
||||
import dev.vality.bouncer.decisions.ArbiterSrv;
|
||||
import dev.vality.woody.thrift.impl.http.THSpawnClientBuilder;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.orgmanager.config;
|
||||
package dev.vality.orgmanager.config;
|
||||
|
||||
import com.rbkmoney.damsel.message_sender.MessageSenderSrv;
|
||||
import com.rbkmoney.woody.thrift.impl.http.THSpawnClientBuilder;
|
||||
import dev.vality.damsel.message_sender.MessageSenderSrv;
|
||||
import dev.vality.woody.thrift.impl.http.THSpawnClientBuilder;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.orgmanager.config;
|
||||
package dev.vality.orgmanager.config;
|
||||
|
||||
import com.rbkmoney.damsel.payment_processing.PartyManagementSrv;
|
||||
import com.rbkmoney.woody.thrift.impl.http.THSpawnClientBuilder;
|
||||
import dev.vality.damsel.payment_processing.PartyManagementSrv;
|
||||
import dev.vality.woody.thrift.impl.http.THSpawnClientBuilder;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.config;
|
||||
package dev.vality.orgmanager.config;
|
||||
|
||||
import net.javacrumbs.shedlock.core.LockProvider;
|
||||
import net.javacrumbs.shedlock.provider.jdbctemplate.JdbcTemplateLockProvider;
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.orgmanager.config;
|
||||
package dev.vality.orgmanager.config;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.rbkmoney.orgmanager.config.properties.KeyCloakProperties;
|
||||
import dev.vality.orgmanager.config.properties.KeyCloakProperties;
|
||||
import org.keycloak.adapters.KeycloakConfigResolver;
|
||||
import org.keycloak.adapters.KeycloakDeployment;
|
||||
import org.keycloak.adapters.KeycloakDeploymentBuilder;
|
||||
@ -10,7 +10,6 @@ import org.keycloak.adapters.springsecurity.config.KeycloakWebSecurityConfigurer
|
||||
import org.keycloak.adapters.springsecurity.management.HttpSessionManager;
|
||||
import org.keycloak.representations.adapters.config.AdapterConfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.config;
|
||||
package dev.vality.orgmanager.config;
|
||||
|
||||
import org.apache.catalina.connector.Connector;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.config.properties;
|
||||
package dev.vality.orgmanager.config.properties;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.config.properties;
|
||||
package dev.vality.orgmanager.config.properties;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.config.properties;
|
||||
package dev.vality.orgmanager.config.properties;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.config.properties;
|
||||
package dev.vality.orgmanager.config.properties;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
@ -1,9 +1,9 @@
|
||||
package com.rbkmoney.orgmanager.controller;
|
||||
package dev.vality.orgmanager.controller;
|
||||
|
||||
import com.rbkmoney.orgmanager.service.*;
|
||||
import com.rbkmoney.orgmanager.service.dto.ResourceDto;
|
||||
import com.rbkmoney.swag.organizations.api.OrgsApi;
|
||||
import com.rbkmoney.swag.organizations.model.*;
|
||||
import dev.vality.orgmanager.service.*;
|
||||
import dev.vality.orgmanager.service.dto.ResourceDto;
|
||||
import dev.vality.swag.organizations.api.OrgsApi;
|
||||
import dev.vality.swag.organizations.model.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.keycloak.representations.AccessToken;
|
@ -1,11 +1,11 @@
|
||||
package com.rbkmoney.orgmanager.controller;
|
||||
package dev.vality.orgmanager.controller;
|
||||
|
||||
import com.rbkmoney.orgmanager.service.KeycloakService;
|
||||
import com.rbkmoney.orgmanager.service.OrganizationService;
|
||||
import com.rbkmoney.orgmanager.service.ResourceAccessService;
|
||||
import com.rbkmoney.orgmanager.service.dto.ResourceDto;
|
||||
import com.rbkmoney.swag.organizations.api.UserApi;
|
||||
import com.rbkmoney.swag.organizations.model.*;
|
||||
import dev.vality.orgmanager.service.KeycloakService;
|
||||
import dev.vality.orgmanager.service.OrganizationService;
|
||||
import dev.vality.orgmanager.service.ResourceAccessService;
|
||||
import dev.vality.orgmanager.service.dto.ResourceDto;
|
||||
import dev.vality.swag.organizations.api.UserApi;
|
||||
import dev.vality.swag.organizations.model.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.keycloak.representations.AccessToken;
|
@ -1,6 +1,6 @@
|
||||
package com.rbkmoney.orgmanager.controller.converter;
|
||||
package dev.vality.orgmanager.controller.converter;
|
||||
|
||||
import com.rbkmoney.swag.organizations.model.InvitationStatusName;
|
||||
import dev.vality.swag.organizations.model.InvitationStatusName;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
|
||||
public class InvitationStatusConverter implements Converter<String, InvitationStatusName> {
|
@ -1,9 +1,10 @@
|
||||
package com.rbkmoney.orgmanager.converter;
|
||||
package dev.vality.orgmanager.converter;
|
||||
|
||||
import com.rbkmoney.bouncer.context.v1.*;
|
||||
import com.rbkmoney.orgmanager.entity.MemberEntity;
|
||||
import com.rbkmoney.orgmanager.entity.MemberRoleEntity;
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationEntity;
|
||||
import dev.vality.bouncer.base.Entity;
|
||||
import dev.vality.bouncer.context.v1.*;
|
||||
import dev.vality.orgmanager.entity.MemberEntity;
|
||||
import dev.vality.orgmanager.entity.MemberRoleEntity;
|
||||
import dev.vality.orgmanager.entity.OrganizationEntity;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.rbkmoney.orgmanager.converter;
|
||||
package dev.vality.orgmanager.converter;
|
||||
|
||||
import com.rbkmoney.orgmanager.config.properties.InviteTokenProperties;
|
||||
import com.rbkmoney.orgmanager.entity.InvitationEntity;
|
||||
import com.rbkmoney.orgmanager.util.JsonMapper;
|
||||
import com.rbkmoney.swag.organizations.model.*;
|
||||
import dev.vality.orgmanager.config.properties.InviteTokenProperties;
|
||||
import dev.vality.orgmanager.entity.InvitationEntity;
|
||||
import dev.vality.orgmanager.util.JsonMapper;
|
||||
import dev.vality.swag.organizations.model.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.rbkmoney.orgmanager.converter;
|
||||
package dev.vality.orgmanager.converter;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.MemberEntity;
|
||||
import com.rbkmoney.orgmanager.entity.MemberRoleEntity;
|
||||
import com.rbkmoney.orgmanager.service.dto.MemberDto;
|
||||
import com.rbkmoney.orgmanager.service.dto.MemberWithRoleDto;
|
||||
import com.rbkmoney.swag.organizations.model.Member;
|
||||
import com.rbkmoney.swag.organizations.model.MemberRole;
|
||||
import dev.vality.orgmanager.entity.MemberEntity;
|
||||
import dev.vality.orgmanager.entity.MemberRoleEntity;
|
||||
import dev.vality.orgmanager.service.dto.MemberDto;
|
||||
import dev.vality.orgmanager.service.dto.MemberWithRoleDto;
|
||||
import dev.vality.swag.organizations.model.Member;
|
||||
import dev.vality.swag.organizations.model.MemberRole;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.rbkmoney.orgmanager.converter;
|
||||
package dev.vality.orgmanager.converter;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.MemberRoleEntity;
|
||||
import com.rbkmoney.orgmanager.service.dto.MemberWithRoleDto;
|
||||
import com.rbkmoney.swag.organizations.model.MemberRole;
|
||||
import com.rbkmoney.swag.organizations.model.MemberRoleScope;
|
||||
import com.rbkmoney.swag.organizations.model.ResourceScopeId;
|
||||
import com.rbkmoney.swag.organizations.model.RoleId;
|
||||
import dev.vality.orgmanager.entity.MemberRoleEntity;
|
||||
import dev.vality.orgmanager.service.dto.MemberWithRoleDto;
|
||||
import dev.vality.swag.organizations.model.MemberRole;
|
||||
import dev.vality.swag.organizations.model.MemberRoleScope;
|
||||
import dev.vality.swag.organizations.model.ResourceScopeId;
|
||||
import dev.vality.swag.organizations.model.RoleId;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Objects;
|
@ -1,8 +1,8 @@
|
||||
package com.rbkmoney.orgmanager.converter;
|
||||
package dev.vality.orgmanager.converter;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationEntity;
|
||||
import com.rbkmoney.orgmanager.util.JsonMapper;
|
||||
import com.rbkmoney.swag.organizations.model.Organization;
|
||||
import dev.vality.orgmanager.entity.OrganizationEntity;
|
||||
import dev.vality.orgmanager.util.JsonMapper;
|
||||
import dev.vality.swag.organizations.model.Organization;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.rbkmoney.orgmanager.converter;
|
||||
package dev.vality.orgmanager.converter;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationRoleEntity;
|
||||
import com.rbkmoney.swag.organizations.model.ResourceScopeId;
|
||||
import com.rbkmoney.swag.organizations.model.Role;
|
||||
import com.rbkmoney.swag.organizations.model.RoleId;
|
||||
import dev.vality.orgmanager.entity.OrganizationRoleEntity;
|
||||
import dev.vality.swag.organizations.model.ResourceScopeId;
|
||||
import dev.vality.swag.organizations.model.Role;
|
||||
import dev.vality.swag.organizations.model.RoleId;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.entity;
|
||||
package dev.vality.orgmanager.entity;
|
||||
|
||||
import lombok.*;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.entity;
|
||||
package dev.vality.orgmanager.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.entity;
|
||||
package dev.vality.orgmanager.entity;
|
||||
|
||||
import lombok.*;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.entity;
|
||||
package dev.vality.orgmanager.entity;
|
||||
|
||||
import lombok.*;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.entity;
|
||||
package dev.vality.orgmanager.entity;
|
||||
|
||||
import lombok.*;
|
||||
import org.hibernate.annotations.Fetch;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.entity;
|
||||
package dev.vality.orgmanager.entity;
|
||||
|
||||
import lombok.*;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.entity;
|
||||
package dev.vality.orgmanager.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.entity.naming;
|
||||
package dev.vality.orgmanager.entity.naming;
|
||||
|
||||
import com.google.common.base.CaseFormat;
|
||||
import org.hibernate.boot.model.naming.Identifier;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.exception;
|
||||
package dev.vality.orgmanager.exception;
|
||||
|
||||
public class AccessDeniedException extends RuntimeException {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.exception;
|
||||
package dev.vality.orgmanager.exception;
|
||||
|
||||
public class BouncerException extends RuntimeException {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.exception;
|
||||
package dev.vality.orgmanager.exception;
|
||||
|
||||
import lombok.Getter;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.exception;
|
||||
package dev.vality.orgmanager.exception;
|
||||
|
||||
import lombok.Getter;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.exception;
|
||||
package dev.vality.orgmanager.exception;
|
||||
|
||||
import lombok.Getter;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.exception;
|
||||
package dev.vality.orgmanager.exception;
|
||||
|
||||
public class LastRoleException extends RuntimeException {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.exception;
|
||||
package dev.vality.orgmanager.exception;
|
||||
|
||||
public class PartyManagementException extends RuntimeException {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.exception;
|
||||
package dev.vality.orgmanager.exception;
|
||||
|
||||
public class ResourceNotFoundException extends RuntimeException {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.orgmanager.exception;
|
||||
package dev.vality.orgmanager.exception;
|
||||
|
||||
import com.rbkmoney.swag.organizations.model.InlineResponse422;
|
||||
import com.rbkmoney.swag.organizations.model.InlineResponse4222;
|
||||
import dev.vality.swag.organizations.model.InlineResponse422;
|
||||
import dev.vality.swag.organizations.model.InlineResponse4222;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.pagination;
|
||||
package dev.vality.orgmanager.pagination;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.data.domain.Pageable;
|
@ -1,6 +1,6 @@
|
||||
package com.rbkmoney.orgmanager.repository;
|
||||
package dev.vality.orgmanager.repository;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.InvitationEntity;
|
||||
import dev.vality.orgmanager.entity.InvitationEntity;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.jpa.repository.QueryHints;
|
@ -1,6 +1,6 @@
|
||||
package com.rbkmoney.orgmanager.repository;
|
||||
package dev.vality.orgmanager.repository;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.MemberContextEntity;
|
||||
import dev.vality.orgmanager.entity.MemberContextEntity;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.orgmanager.repository;
|
||||
package dev.vality.orgmanager.repository;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.MemberEntity;
|
||||
import com.rbkmoney.orgmanager.service.dto.MemberWithRoleDto;
|
||||
import dev.vality.orgmanager.entity.MemberEntity;
|
||||
import dev.vality.orgmanager.service.dto.MemberWithRoleDto;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.stereotype.Repository;
|
@ -1,6 +1,6 @@
|
||||
package com.rbkmoney.orgmanager.repository;
|
||||
package dev.vality.orgmanager.repository;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.MemberRoleEntity;
|
||||
import dev.vality.orgmanager.entity.MemberRoleEntity;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.rbkmoney.orgmanager.repository;
|
||||
package dev.vality.orgmanager.repository;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationEntity;
|
||||
import dev.vality.orgmanager.entity.OrganizationEntity;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.stereotype.Repository;
|
@ -1,6 +1,6 @@
|
||||
package com.rbkmoney.orgmanager.repository;
|
||||
package dev.vality.orgmanager.repository;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationRoleEntity;
|
||||
import dev.vality.orgmanager.entity.OrganizationRoleEntity;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.rbkmoney.orgmanager.scheduler;
|
||||
package dev.vality.orgmanager.scheduler;
|
||||
|
||||
import com.rbkmoney.orgmanager.service.InvitationService;
|
||||
import dev.vality.orgmanager.service.InvitationService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.javacrumbs.shedlock.spring.annotation.SchedulerLock;
|
@ -1,13 +1,13 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.bouncer.context.v1.User;
|
||||
import com.rbkmoney.bouncer.ctx.ContextFragment;
|
||||
import com.rbkmoney.bouncer.ctx.ContextFragmentType;
|
||||
import com.rbkmoney.orgmanagement.AuthContextProviderSrv;
|
||||
import com.rbkmoney.orgmanager.converter.BouncerContextConverter;
|
||||
import com.rbkmoney.orgmanager.service.model.UserInfo;
|
||||
import com.rbkmoney.woody.api.trace.ContextUtils;
|
||||
import com.rbkmoney.woody.api.trace.context.metadata.user.UserIdentityEmailExtensionKit;
|
||||
import dev.vality.bouncer.context.v1.User;
|
||||
import dev.vality.bouncer.ctx.ContextFragment;
|
||||
import dev.vality.bouncer.ctx.ContextFragmentType;
|
||||
import dev.vality.orgmanagement.AuthContextProviderSrv;
|
||||
import dev.vality.orgmanager.converter.BouncerContextConverter;
|
||||
import dev.vality.orgmanager.service.model.UserInfo;
|
||||
import dev.vality.woody.api.trace.ContextUtils;
|
||||
import dev.vality.woody.api.trace.context.metadata.user.UserIdentityEmailExtensionKit;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.thrift.TException;
|
||||
import org.apache.thrift.TSerializer;
|
||||
@ -22,8 +22,8 @@ public class AuthContextService implements AuthContextProviderSrv.Iface {
|
||||
|
||||
@Override
|
||||
public ContextFragment getUserContext(String id) throws TException {
|
||||
com.rbkmoney.bouncer.context.v1.ContextFragment contextFragment =
|
||||
new com.rbkmoney.bouncer.context.v1.ContextFragment();
|
||||
dev.vality.bouncer.context.v1.ContextFragment contextFragment =
|
||||
new dev.vality.bouncer.context.v1.ContextFragment();
|
||||
contextFragment.setUser(getUser(id));
|
||||
TSerializer byteSerializer = new TSerializer();
|
||||
return new ContextFragment()
|
@ -1,14 +1,16 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.bouncer.context.v1.*;
|
||||
import com.rbkmoney.bouncer.ctx.ContextFragmentType;
|
||||
import com.rbkmoney.bouncer.decisions.Context;
|
||||
import com.rbkmoney.orgmanagement.UserNotFound;
|
||||
import com.rbkmoney.orgmanager.config.properties.BouncerProperties;
|
||||
import com.rbkmoney.orgmanager.converter.BouncerContextConverter;
|
||||
import com.rbkmoney.orgmanager.service.dto.BouncerContextDto;
|
||||
import com.rbkmoney.orgmanager.service.dto.InvitationDto;
|
||||
import com.rbkmoney.orgmanager.service.model.UserInfo;
|
||||
|
||||
import dev.vality.bouncer.base.Entity;
|
||||
import dev.vality.bouncer.context.v1.*;
|
||||
import dev.vality.bouncer.ctx.ContextFragmentType;
|
||||
import dev.vality.bouncer.decisions.Context;
|
||||
import dev.vality.orgmanagement.UserNotFound;
|
||||
import dev.vality.orgmanager.config.properties.BouncerProperties;
|
||||
import dev.vality.orgmanager.converter.BouncerContextConverter;
|
||||
import dev.vality.orgmanager.service.dto.BouncerContextDto;
|
||||
import dev.vality.orgmanager.service.dto.InvitationDto;
|
||||
import dev.vality.orgmanager.service.model.UserInfo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.thrift.TException;
|
||||
@ -31,7 +33,7 @@ public class BouncerContextFactory {
|
||||
|
||||
public Context buildContext(BouncerContextDto bouncerContext) throws TException {
|
||||
Context context = new Context();
|
||||
com.rbkmoney.bouncer.ctx.ContextFragment fragment = new com.rbkmoney.bouncer.ctx.ContextFragment();
|
||||
dev.vality.bouncer.ctx.ContextFragment fragment = new dev.vality.bouncer.ctx.ContextFragment();
|
||||
fragment.setType(ContextFragmentType.v1_thrift_binary);
|
||||
ContextFragment contextFragment = buildContextFragment(bouncerContext);
|
||||
TSerializer serializer = new TSerializer();
|
@ -0,0 +1,8 @@
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import dev.vality.orgmanager.service.dto.BouncerContextDto;
|
||||
|
||||
public interface BouncerService {
|
||||
|
||||
boolean havePrivileges(BouncerContextDto bouncerContext);
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.bouncer.decisions.ArbiterSrv;
|
||||
import com.rbkmoney.bouncer.decisions.Context;
|
||||
import com.rbkmoney.bouncer.decisions.Judgement;
|
||||
import com.rbkmoney.bouncer.decisions.Resolution;
|
||||
import com.rbkmoney.orgmanagement.UserNotFound;
|
||||
import com.rbkmoney.orgmanager.config.properties.BouncerProperties;
|
||||
import com.rbkmoney.orgmanager.exception.BouncerException;
|
||||
import com.rbkmoney.orgmanager.service.dto.BouncerContextDto;
|
||||
import dev.vality.bouncer.decisions.ArbiterSrv;
|
||||
import dev.vality.bouncer.decisions.Context;
|
||||
import dev.vality.bouncer.decisions.Judgement;
|
||||
import dev.vality.bouncer.decisions.Resolution;
|
||||
import dev.vality.orgmanagement.UserNotFound;
|
||||
import dev.vality.orgmanager.config.properties.BouncerProperties;
|
||||
import dev.vality.orgmanager.exception.BouncerException;
|
||||
import dev.vality.orgmanager.service.dto.BouncerContextDto;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.thrift.TException;
|
||||
import org.springframework.stereotype.Service;
|
@ -1,14 +1,14 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.orgmanager.converter.InvitationConverter;
|
||||
import com.rbkmoney.orgmanager.entity.InvitationEntity;
|
||||
import com.rbkmoney.orgmanager.exception.InviteAlreadyAcceptedException;
|
||||
import com.rbkmoney.orgmanager.exception.InviteExpiredException;
|
||||
import com.rbkmoney.orgmanager.exception.InviteRevokedException;
|
||||
import com.rbkmoney.orgmanager.exception.ResourceNotFoundException;
|
||||
import com.rbkmoney.orgmanager.repository.InvitationRepository;
|
||||
import com.rbkmoney.orgmanager.repository.OrganizationRepository;
|
||||
import com.rbkmoney.swag.organizations.model.*;
|
||||
import dev.vality.orgmanager.converter.InvitationConverter;
|
||||
import dev.vality.orgmanager.entity.InvitationEntity;
|
||||
import dev.vality.orgmanager.exception.InviteAlreadyAcceptedException;
|
||||
import dev.vality.orgmanager.exception.InviteExpiredException;
|
||||
import dev.vality.orgmanager.exception.InviteRevokedException;
|
||||
import dev.vality.orgmanager.exception.ResourceNotFoundException;
|
||||
import dev.vality.orgmanager.repository.InvitationRepository;
|
||||
import dev.vality.orgmanager.repository.OrganizationRepository;
|
||||
import dev.vality.swag.organizations.model.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@ -19,7 +19,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static java.util.stream.Collectors.toList;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import org.keycloak.KeycloakPrincipal;
|
||||
import org.keycloak.representations.AccessToken;
|
@ -1,9 +1,9 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.damsel.message_sender.MailBody;
|
||||
import com.rbkmoney.damsel.message_sender.Message;
|
||||
import com.rbkmoney.damsel.message_sender.MessageMail;
|
||||
import com.rbkmoney.damsel.message_sender.MessageSenderSrv;
|
||||
import dev.vality.damsel.message_sender.MailBody;
|
||||
import dev.vality.damsel.message_sender.Message;
|
||||
import dev.vality.damsel.message_sender.MessageMail;
|
||||
import dev.vality.damsel.message_sender.MessageSenderSrv;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
@ -0,0 +1,13 @@
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import dev.vality.orgmanager.entity.MemberRoleEntity;
|
||||
import dev.vality.swag.organizations.model.MemberRole;
|
||||
|
||||
public interface MemberRoleService {
|
||||
|
||||
MemberRole findById(String id);
|
||||
|
||||
MemberRoleEntity findEntityById(String id);
|
||||
|
||||
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.orgmanager.converter.MemberRoleConverter;
|
||||
import com.rbkmoney.orgmanager.entity.MemberRoleEntity;
|
||||
import com.rbkmoney.orgmanager.exception.ResourceNotFoundException;
|
||||
import com.rbkmoney.orgmanager.repository.MemberRoleRepository;
|
||||
import com.rbkmoney.swag.organizations.model.MemberRole;
|
||||
import dev.vality.orgmanager.converter.MemberRoleConverter;
|
||||
import dev.vality.orgmanager.entity.MemberRoleEntity;
|
||||
import dev.vality.orgmanager.exception.ResourceNotFoundException;
|
||||
import dev.vality.orgmanager.repository.MemberRoleRepository;
|
||||
import dev.vality.swag.organizations.model.MemberRole;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
@ -1,6 +1,6 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.MemberEntity;
|
||||
import dev.vality.orgmanager.entity.MemberEntity;
|
||||
|
||||
import java.util.Optional;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.MemberEntity;
|
||||
import com.rbkmoney.orgmanager.repository.MemberRepository;
|
||||
import dev.vality.orgmanager.entity.MemberEntity;
|
||||
import dev.vality.orgmanager.repository.MemberRepository;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
@ -1,14 +1,14 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.orgmanager.converter.OrganizationRoleConverter;
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationEntity;
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationRoleEntity;
|
||||
import com.rbkmoney.orgmanager.exception.ResourceNotFoundException;
|
||||
import com.rbkmoney.orgmanager.repository.OrganizationRepository;
|
||||
import com.rbkmoney.orgmanager.repository.OrganizationRoleRepository;
|
||||
import com.rbkmoney.swag.organizations.model.Role;
|
||||
import com.rbkmoney.swag.organizations.model.RoleAvailableListResult;
|
||||
import com.rbkmoney.swag.organizations.model.RoleId;
|
||||
import dev.vality.orgmanager.converter.OrganizationRoleConverter;
|
||||
import dev.vality.orgmanager.entity.OrganizationEntity;
|
||||
import dev.vality.orgmanager.entity.OrganizationRoleEntity;
|
||||
import dev.vality.orgmanager.exception.ResourceNotFoundException;
|
||||
import dev.vality.orgmanager.repository.OrganizationRepository;
|
||||
import dev.vality.orgmanager.repository.OrganizationRoleRepository;
|
||||
import dev.vality.swag.organizations.model.Role;
|
||||
import dev.vality.swag.organizations.model.RoleAvailableListResult;
|
||||
import dev.vality.swag.organizations.model.RoleId;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
@ -1,17 +1,17 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.orgmanager.converter.MemberConverter;
|
||||
import com.rbkmoney.orgmanager.converter.MemberRoleConverter;
|
||||
import com.rbkmoney.orgmanager.converter.OrganizationConverter;
|
||||
import com.rbkmoney.orgmanager.entity.*;
|
||||
import com.rbkmoney.orgmanager.exception.AccessDeniedException;
|
||||
import com.rbkmoney.orgmanager.exception.LastRoleException;
|
||||
import com.rbkmoney.orgmanager.exception.ResourceNotFoundException;
|
||||
import com.rbkmoney.orgmanager.repository.MemberContextRepository;
|
||||
import com.rbkmoney.orgmanager.repository.MemberRepository;
|
||||
import com.rbkmoney.orgmanager.repository.OrganizationRepository;
|
||||
import com.rbkmoney.orgmanager.service.dto.MemberWithRoleDto;
|
||||
import com.rbkmoney.swag.organizations.model.*;
|
||||
import dev.vality.orgmanager.converter.MemberConverter;
|
||||
import dev.vality.orgmanager.converter.MemberRoleConverter;
|
||||
import dev.vality.orgmanager.converter.OrganizationConverter;
|
||||
import dev.vality.orgmanager.entity.*;
|
||||
import dev.vality.orgmanager.exception.AccessDeniedException;
|
||||
import dev.vality.orgmanager.exception.LastRoleException;
|
||||
import dev.vality.orgmanager.exception.ResourceNotFoundException;
|
||||
import dev.vality.orgmanager.repository.MemberContextRepository;
|
||||
import dev.vality.orgmanager.repository.MemberRepository;
|
||||
import dev.vality.orgmanager.repository.OrganizationRepository;
|
||||
import dev.vality.orgmanager.service.dto.MemberWithRoleDto;
|
||||
import dev.vality.swag.organizations.model.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.keycloak.representations.AccessToken;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
public interface PartyManagementService {
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.damsel.domain.PartyContactInfo;
|
||||
import com.rbkmoney.damsel.payment_processing.ExternalUser;
|
||||
import com.rbkmoney.damsel.payment_processing.PartyExists;
|
||||
import com.rbkmoney.damsel.payment_processing.PartyManagementSrv;
|
||||
import com.rbkmoney.damsel.payment_processing.PartyParams;
|
||||
import com.rbkmoney.damsel.payment_processing.UserInfo;
|
||||
import com.rbkmoney.damsel.payment_processing.UserType;
|
||||
import com.rbkmoney.orgmanager.exception.PartyManagementException;
|
||||
import dev.vality.damsel.domain.PartyContactInfo;
|
||||
import dev.vality.damsel.payment_processing.ExternalUser;
|
||||
import dev.vality.damsel.payment_processing.PartyExists;
|
||||
import dev.vality.damsel.payment_processing.PartyManagementSrv;
|
||||
import dev.vality.damsel.payment_processing.PartyParams;
|
||||
import dev.vality.damsel.payment_processing.UserInfo;
|
||||
import dev.vality.damsel.payment_processing.UserType;
|
||||
import dev.vality.orgmanager.exception.PartyManagementException;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.thrift.TException;
|
@ -1,6 +1,6 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.orgmanager.service.dto.ResourceDto;
|
||||
import dev.vality.orgmanager.service.dto.ResourceDto;
|
||||
|
||||
public interface ResourceAccessService {
|
||||
|
@ -1,14 +1,14 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.orgmanager.config.properties.AccessProperties;
|
||||
import com.rbkmoney.orgmanager.exception.AccessDeniedException;
|
||||
import com.rbkmoney.orgmanager.service.dto.BouncerContextDto;
|
||||
import com.rbkmoney.orgmanager.service.dto.InvitationDto;
|
||||
import com.rbkmoney.orgmanager.service.dto.ResourceDto;
|
||||
import com.rbkmoney.orgmanager.service.dto.RoleDto;
|
||||
import com.rbkmoney.orgmanager.util.StackUtils;
|
||||
import com.rbkmoney.swag.organizations.model.MemberRole;
|
||||
import com.rbkmoney.swag.organizations.model.MemberRoleScope;
|
||||
import dev.vality.orgmanager.config.properties.AccessProperties;
|
||||
import dev.vality.orgmanager.exception.AccessDeniedException;
|
||||
import dev.vality.orgmanager.service.dto.BouncerContextDto;
|
||||
import dev.vality.orgmanager.service.dto.InvitationDto;
|
||||
import dev.vality.orgmanager.service.dto.ResourceDto;
|
||||
import dev.vality.orgmanager.service.dto.RoleDto;
|
||||
import dev.vality.orgmanager.util.StackUtils;
|
||||
import dev.vality.swag.organizations.model.MemberRole;
|
||||
import dev.vality.swag.organizations.model.MemberRoleScope;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
@ -0,0 +1,9 @@
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import dev.vality.orgmanager.service.model.UserInfo;
|
||||
|
||||
public interface UserService {
|
||||
|
||||
UserInfo findById(String id);
|
||||
|
||||
}
|
@ -1,10 +1,8 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.bouncer.context.v1.Organization;
|
||||
import com.rbkmoney.bouncer.context.v1.User;
|
||||
import com.rbkmoney.orgmanager.entity.MemberEntity;
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationEntity;
|
||||
import com.rbkmoney.orgmanager.service.model.UserInfo;
|
||||
import dev.vality.orgmanager.entity.MemberEntity;
|
||||
import dev.vality.orgmanager.entity.OrganizationEntity;
|
||||
import dev.vality.orgmanager.service.model.UserInfo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.service.dto;
|
||||
package dev.vality.orgmanager.service.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.service.dto;
|
||||
package dev.vality.orgmanager.service.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.service.dto;
|
||||
package dev.vality.orgmanager.service.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.service.dto;
|
||||
package dev.vality.orgmanager.service.dto;
|
||||
|
||||
public interface MemberWithRoleDto {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.service.dto;
|
||||
package dev.vality.orgmanager.service.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.service.dto;
|
||||
package dev.vality.orgmanager.service.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.orgmanager.service.model;
|
||||
package dev.vality.orgmanager.service.model;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.MemberEntity;
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationEntity;
|
||||
import dev.vality.orgmanager.entity.MemberEntity;
|
||||
import dev.vality.orgmanager.entity.OrganizationEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.rbkmoney.orgmanager.servlet;
|
||||
package dev.vality.orgmanager.servlet;
|
||||
|
||||
import com.rbkmoney.orgmanagement.AuthContextProviderSrv;
|
||||
import com.rbkmoney.woody.api.trace.context.metadata.user.UserIdentityEmailExtensionKit;
|
||||
import com.rbkmoney.woody.thrift.impl.http.THServiceBuilder;
|
||||
import dev.vality.orgmanagement.AuthContextProviderSrv;
|
||||
import dev.vality.woody.api.trace.context.metadata.user.UserIdentityEmailExtensionKit;
|
||||
import dev.vality.woody.thrift.impl.http.THServiceBuilder;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.util;
|
||||
package dev.vality.orgmanager.util;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.util;
|
||||
package dev.vality.orgmanager.util;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NoArgsConstructor;
|
@ -10,9 +10,6 @@ management:
|
||||
port: '@management.port@'
|
||||
metrics:
|
||||
export:
|
||||
statsd:
|
||||
flavor: etsy
|
||||
enabled: false
|
||||
prometheus:
|
||||
enabled: false
|
||||
endpoint:
|
||||
@ -52,7 +49,7 @@ spring:
|
||||
password: changeit
|
||||
|
||||
hibernate:
|
||||
physical_naming_strategy: com.rbkmoney.orgmanager.entity.naming.SnakeCaseNamingStrategy
|
||||
physical_naming_strategy: dev.vality.orgmanager.entity.naming.SnakeCaseNamingStrategy
|
||||
|
||||
info:
|
||||
version: '@project.version@'
|
||||
|
@ -1,16 +1,17 @@
|
||||
package com.rbkmoney.orgmanager;
|
||||
package dev.vality.orgmanager;
|
||||
|
||||
import com.rbkmoney.bouncer.context.v1.Organization;
|
||||
import com.rbkmoney.bouncer.context.v1.*;
|
||||
import com.rbkmoney.orgmanager.entity.InvitationEntity;
|
||||
import com.rbkmoney.orgmanager.entity.MemberEntity;
|
||||
import com.rbkmoney.orgmanager.entity.MemberRoleEntity;
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationEntity;
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationRoleEntity;
|
||||
import com.rbkmoney.orgmanager.service.dto.BouncerContextDto;
|
||||
import com.rbkmoney.orgmanager.service.dto.RoleDto;
|
||||
import com.rbkmoney.swag.organizations.model.Invitee;
|
||||
import com.rbkmoney.swag.organizations.model.*;
|
||||
import dev.vality.bouncer.base.Entity;
|
||||
import dev.vality.bouncer.context.v1.Organization;
|
||||
import dev.vality.bouncer.context.v1.*;
|
||||
import dev.vality.orgmanager.entity.InvitationEntity;
|
||||
import dev.vality.orgmanager.entity.MemberEntity;
|
||||
import dev.vality.orgmanager.entity.MemberRoleEntity;
|
||||
import dev.vality.orgmanager.entity.OrganizationEntity;
|
||||
import dev.vality.orgmanager.entity.OrganizationRoleEntity;
|
||||
import dev.vality.orgmanager.service.dto.BouncerContextDto;
|
||||
import dev.vality.orgmanager.service.dto.RoleDto;
|
||||
import dev.vality.swag.organizations.model.Invitee;
|
||||
import dev.vality.swag.organizations.model.*;
|
||||
import org.keycloak.representations.AccessToken;
|
||||
|
||||
import java.time.LocalDateTime;
|
@ -1,8 +1,8 @@
|
||||
package com.rbkmoney.orgmanager.controller;
|
||||
package dev.vality.orgmanager.controller;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.rbkmoney.orgmanager.repository.AbstractRepositoryTest;
|
||||
import com.rbkmoney.orgmanager.service.ResourceAccessService;
|
||||
import dev.vality.orgmanager.repository.AbstractRepositoryTest;
|
||||
import dev.vality.orgmanager.service.ResourceAccessService;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.controller;
|
||||
package dev.vality.orgmanager.controller;
|
||||
|
||||
import io.jsonwebtoken.Jwts;
|
||||
import io.jsonwebtoken.SignatureAlgorithm;
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.controller;
|
||||
package dev.vality.orgmanager.controller;
|
||||
|
||||
import static com.github.tomakehurst.wiremock.client.WireMock.*;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.orgmanager.controller;
|
||||
package dev.vality.orgmanager.controller;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.test.context.TestConfiguration;
|
@ -1,16 +1,16 @@
|
||||
package com.rbkmoney.orgmanager.controller;
|
||||
package dev.vality.orgmanager.controller;
|
||||
|
||||
import com.rbkmoney.orgmanager.TestObjectFactory;
|
||||
import com.rbkmoney.orgmanager.entity.MemberEntity;
|
||||
import com.rbkmoney.orgmanager.entity.MemberRoleEntity;
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationEntity;
|
||||
import com.rbkmoney.orgmanager.exception.AccessDeniedException;
|
||||
import com.rbkmoney.orgmanager.exception.BouncerException;
|
||||
import com.rbkmoney.orgmanager.service.dto.ResourceDto;
|
||||
import com.rbkmoney.orgmanager.util.TestData;
|
||||
import com.rbkmoney.swag.organizations.model.InvitationRequest;
|
||||
import com.rbkmoney.swag.organizations.model.MemberRole;
|
||||
import com.rbkmoney.swag.organizations.model.RoleId;
|
||||
import dev.vality.orgmanager.TestObjectFactory;
|
||||
import dev.vality.orgmanager.entity.MemberEntity;
|
||||
import dev.vality.orgmanager.entity.MemberRoleEntity;
|
||||
import dev.vality.orgmanager.entity.OrganizationEntity;
|
||||
import dev.vality.orgmanager.exception.AccessDeniedException;
|
||||
import dev.vality.orgmanager.exception.BouncerException;
|
||||
import dev.vality.orgmanager.service.dto.ResourceDto;
|
||||
import dev.vality.orgmanager.util.TestData;
|
||||
import dev.vality.swag.organizations.model.InvitationRequest;
|
||||
import dev.vality.swag.organizations.model.MemberRole;
|
||||
import dev.vality.swag.organizations.model.RoleId;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.ArgumentMatchers;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
@ -1,10 +1,10 @@
|
||||
package com.rbkmoney.orgmanager.controller;
|
||||
package dev.vality.orgmanager.controller;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.*;
|
||||
import com.rbkmoney.orgmanager.exception.AccessDeniedException;
|
||||
import com.rbkmoney.orgmanager.exception.ResourceNotFoundException;
|
||||
import com.rbkmoney.orgmanager.service.dto.ResourceDto;
|
||||
import com.rbkmoney.swag.organizations.model.*;
|
||||
import dev.vality.orgmanager.entity.*;
|
||||
import dev.vality.orgmanager.exception.AccessDeniedException;
|
||||
import dev.vality.orgmanager.exception.ResourceNotFoundException;
|
||||
import dev.vality.orgmanager.service.dto.ResourceDto;
|
||||
import dev.vality.swag.organizations.model.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.ArgumentMatchers;
|
||||
import org.springframework.http.MediaType;
|
||||
@ -17,8 +17,8 @@ import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.rbkmoney.orgmanager.TestObjectFactory.*;
|
||||
import static com.rbkmoney.orgmanager.controller.JwtTokenBuilder.DEFAULT_EMAIL;
|
||||
import static dev.vality.orgmanager.TestObjectFactory.*;
|
||||
import static dev.vality.orgmanager.controller.JwtTokenBuilder.DEFAULT_EMAIL;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.mockito.Mockito.doThrow;
|
@ -1,14 +1,14 @@
|
||||
package com.rbkmoney.orgmanager.converter;
|
||||
package dev.vality.orgmanager.converter;
|
||||
|
||||
import com.rbkmoney.bouncer.context.v1.Entity;
|
||||
import com.rbkmoney.bouncer.context.v1.OrgRole;
|
||||
import com.rbkmoney.bouncer.context.v1.OrgRoleScope;
|
||||
import com.rbkmoney.bouncer.context.v1.User;
|
||||
import com.rbkmoney.orgmanager.TestObjectFactory;
|
||||
import com.rbkmoney.orgmanager.entity.MemberEntity;
|
||||
import com.rbkmoney.orgmanager.entity.MemberRoleEntity;
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationEntity;
|
||||
import com.rbkmoney.swag.organizations.model.RoleId;
|
||||
import dev.vality.bouncer.base.Entity;
|
||||
import dev.vality.bouncer.context.v1.OrgRole;
|
||||
import dev.vality.bouncer.context.v1.OrgRoleScope;
|
||||
import dev.vality.bouncer.context.v1.User;
|
||||
import dev.vality.orgmanager.TestObjectFactory;
|
||||
import dev.vality.orgmanager.entity.MemberEntity;
|
||||
import dev.vality.orgmanager.entity.MemberRoleEntity;
|
||||
import dev.vality.orgmanager.entity.OrganizationEntity;
|
||||
import dev.vality.swag.organizations.model.RoleId;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.rbkmoney.orgmanager.converter;
|
||||
package dev.vality.orgmanager.converter;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.rbkmoney.orgmanager.config.properties.InviteTokenProperties;
|
||||
import com.rbkmoney.orgmanager.entity.InvitationEntity;
|
||||
import com.rbkmoney.orgmanager.entity.MemberRoleEntity;
|
||||
import com.rbkmoney.orgmanager.util.JsonMapper;
|
||||
import com.rbkmoney.swag.organizations.model.*;
|
||||
import dev.vality.orgmanager.config.properties.InviteTokenProperties;
|
||||
import dev.vality.orgmanager.entity.InvitationEntity;
|
||||
import dev.vality.orgmanager.entity.MemberRoleEntity;
|
||||
import dev.vality.orgmanager.util.JsonMapper;
|
||||
import dev.vality.swag.organizations.model.*;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.rbkmoney.orgmanager.converter;
|
||||
package dev.vality.orgmanager.converter;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.MemberEntity;
|
||||
import com.rbkmoney.orgmanager.entity.MemberRoleEntity;
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationEntity;
|
||||
import com.rbkmoney.swag.organizations.model.Member;
|
||||
import com.rbkmoney.swag.organizations.model.MemberRole;
|
||||
import dev.vality.orgmanager.entity.MemberEntity;
|
||||
import dev.vality.orgmanager.entity.MemberRoleEntity;
|
||||
import dev.vality.orgmanager.entity.OrganizationEntity;
|
||||
import dev.vality.swag.organizations.model.Member;
|
||||
import dev.vality.swag.organizations.model.MemberRole;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.rbkmoney.orgmanager.converter;
|
||||
package dev.vality.orgmanager.converter;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.MemberRoleEntity;
|
||||
import com.rbkmoney.swag.organizations.model.MemberRole;
|
||||
import com.rbkmoney.swag.organizations.model.MemberRoleScope;
|
||||
import com.rbkmoney.swag.organizations.model.ResourceScopeId;
|
||||
import com.rbkmoney.swag.organizations.model.RoleId;
|
||||
import dev.vality.orgmanager.entity.MemberRoleEntity;
|
||||
import dev.vality.swag.organizations.model.MemberRole;
|
||||
import dev.vality.swag.organizations.model.MemberRoleScope;
|
||||
import dev.vality.swag.organizations.model.ResourceScopeId;
|
||||
import dev.vality.swag.organizations.model.RoleId;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.rbkmoney.orgmanager.converter;
|
||||
package dev.vality.orgmanager.converter;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationEntity;
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationRoleEntity;
|
||||
import com.rbkmoney.orgmanager.util.JsonMapper;
|
||||
import com.rbkmoney.swag.organizations.model.Organization;
|
||||
import dev.vality.orgmanager.entity.OrganizationEntity;
|
||||
import dev.vality.orgmanager.entity.OrganizationRoleEntity;
|
||||
import dev.vality.orgmanager.util.JsonMapper;
|
||||
import dev.vality.swag.organizations.model.Organization;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.rbkmoney.orgmanager.converter;
|
||||
package dev.vality.orgmanager.converter;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationRoleEntity;
|
||||
import com.rbkmoney.orgmanager.entity.ScopeEntity;
|
||||
import com.rbkmoney.swag.organizations.model.ResourceScopeId;
|
||||
import com.rbkmoney.swag.organizations.model.Role;
|
||||
import com.rbkmoney.swag.organizations.model.RoleId;
|
||||
import dev.vality.orgmanager.entity.OrganizationRoleEntity;
|
||||
import dev.vality.orgmanager.entity.ScopeEntity;
|
||||
import dev.vality.swag.organizations.model.ResourceScopeId;
|
||||
import dev.vality.swag.organizations.model.Role;
|
||||
import dev.vality.swag.organizations.model.RoleId;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.rbkmoney.orgmanager.repository;
|
||||
package dev.vality.orgmanager.repository;
|
||||
|
||||
import com.rbkmoney.orgmanager.OrgManagerApplication;
|
||||
import dev.vality.orgmanager.OrgManagerApplication;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
@ -1,7 +1,7 @@
|
||||
package com.rbkmoney.orgmanager.repository;
|
||||
package dev.vality.orgmanager.repository;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.InvitationEntity;
|
||||
import com.rbkmoney.orgmanager.entity.MemberRoleEntity;
|
||||
import dev.vality.orgmanager.entity.InvitationEntity;
|
||||
import dev.vality.orgmanager.entity.MemberRoleEntity;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.time.LocalDateTime;
|
@ -1,10 +1,10 @@
|
||||
package com.rbkmoney.orgmanager.repository;
|
||||
package dev.vality.orgmanager.repository;
|
||||
|
||||
import com.rbkmoney.orgmanager.entity.MemberEntity;
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationEntity;
|
||||
import com.rbkmoney.orgmanager.entity.OrganizationRoleEntity;
|
||||
import com.rbkmoney.orgmanager.entity.ScopeEntity;
|
||||
import com.rbkmoney.orgmanager.service.OrganizationService;
|
||||
import dev.vality.orgmanager.entity.MemberEntity;
|
||||
import dev.vality.orgmanager.entity.OrganizationEntity;
|
||||
import dev.vality.orgmanager.entity.OrganizationRoleEntity;
|
||||
import dev.vality.orgmanager.entity.ScopeEntity;
|
||||
import dev.vality.orgmanager.service.OrganizationService;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
@ -1,11 +1,12 @@
|
||||
package com.rbkmoney.orgmanager.service;
|
||||
package dev.vality.orgmanager.service;
|
||||
|
||||
import com.rbkmoney.bouncer.ctx.ContextFragmentType;
|
||||
import com.rbkmoney.orgmanager.TestObjectFactory;
|
||||
import com.rbkmoney.orgmanager.converter.BouncerContextConverter;
|
||||
import com.rbkmoney.orgmanager.service.model.UserInfo;
|
||||
import dev.vality.bouncer.ctx.ContextFragmentType;
|
||||
import dev.vality.orgmanager.TestObjectFactory;
|
||||
import dev.vality.orgmanager.converter.BouncerContextConverter;
|
||||
import dev.vality.orgmanager.service.model.UserInfo;
|
||||
import org.apache.thrift.TDeserializer;
|
||||
import org.apache.thrift.TException;
|
||||
import org.apache.thrift.transport.TTransportException;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
@ -28,6 +29,9 @@ public class AuthContextServiceTest {
|
||||
private UserService userService;
|
||||
private AuthContextService service;
|
||||
|
||||
public AuthContextServiceTest() throws TTransportException {
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
service = new AuthContextService(userService, bouncerConverter);
|
||||
@ -44,7 +48,7 @@ public class AuthContextServiceTest {
|
||||
var userContext = service.getUserContext(id);
|
||||
|
||||
verify(userService, times(1)).findById(id);
|
||||
var contextFragment = new com.rbkmoney.bouncer.context.v1.ContextFragment();
|
||||
var contextFragment = new dev.vality.bouncer.context.v1.ContextFragment();
|
||||
byteDeserializer.deserialize(contextFragment, userContext.getContent());
|
||||
|
||||
assertEquals(member.getId(), contextFragment.getUser().getId());
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user