diff --git a/source/gateway/src/main/java/com/jd/blockchain/gateway/web/GatewayWebServerConfigurer.java b/source/gateway/src/main/java/com/jd/blockchain/gateway/web/GatewayWebServerConfigurer.java index 83268ad8..cfed9081 100644 --- a/source/gateway/src/main/java/com/jd/blockchain/gateway/web/GatewayWebServerConfigurer.java +++ b/source/gateway/src/main/java/com/jd/blockchain/gateway/web/GatewayWebServerConfigurer.java @@ -35,7 +35,18 @@ public class GatewayWebServerConfigurer implements WebMvcConfigurer { JSONSerializeUtils.disableCircularReferenceDetect(); JSONSerializeUtils.configStringSerializer(ByteArray.class); DataContractRegistry.register(BftsmartNodeSettings.class); -// DataContractRegistry.register(LedgerAdminInfo.class); + + // 注册角色/权限相关接口 + DataContractRegistry.register(RolesConfigureOperation.class); + DataContractRegistry.register(RolesConfigureOperation.RolePrivilegeEntry.class); + DataContractRegistry.register(UserAuthorizeOperation.class); + DataContractRegistry.register(UserAuthorizeOperation.UserRolesEntry.class); + DataContractRegistry.register(PrivilegeSet.class); + DataContractRegistry.register(RoleSet.class); + DataContractRegistry.register(SecurityInitSettings.class); + DataContractRegistry.register(RoleInitSettings.class); + DataContractRegistry.register(UserAuthInitSettings.class); + DataContractRegistry.register(LedgerMetadata_V2.class); } diff --git a/source/sdk/sdk-client/src/main/java/com/jd/blockchain/sdk/client/GatewayServiceFactory.java b/source/sdk/sdk-client/src/main/java/com/jd/blockchain/sdk/client/GatewayServiceFactory.java index 7e0729a7..79a329af 100644 --- a/source/sdk/sdk-client/src/main/java/com/jd/blockchain/sdk/client/GatewayServiceFactory.java +++ b/source/sdk/sdk-client/src/main/java/com/jd/blockchain/sdk/client/GatewayServiceFactory.java @@ -56,6 +56,18 @@ public class GatewayServiceFactory implements BlockchainServiceFactory, Closeabl DataContractRegistry.register(ClientIdentification.class); DataContractRegistry.register(BytesValueList.class); + // 注册角色/权限相关接口 + DataContractRegistry.register(RolesConfigureOperation.class); + DataContractRegistry.register(RolesConfigureOperation.RolePrivilegeEntry.class); + DataContractRegistry.register(UserAuthorizeOperation.class); + DataContractRegistry.register(UserAuthorizeOperation.UserRolesEntry.class); + DataContractRegistry.register(PrivilegeSet.class); + DataContractRegistry.register(RoleSet.class); + DataContractRegistry.register(SecurityInitSettings.class); + DataContractRegistry.register(RoleInitSettings.class); + DataContractRegistry.register(UserAuthInitSettings.class); + DataContractRegistry.register(LedgerMetadata_V2.class); + ByteArrayObjectUtil.init(); }