提交 b2214d3a 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 0174a065
......@@ -117,7 +117,9 @@ $ yarn build
|─ ─ favicon.ico 图标
​ |─ ─ src 工程文件夹
|─ ─ assets 静态资源
|─ ─ codelist 动态代码表服务
|─ ─ components 基础组件,主要包含编辑器组件和其他全局使用的组件
|─ ─ counter 计数器服务
|─ ─ engine 引擎文件,主要封装了内置视图的内置逻辑
|─ ─ environments 环境文件
​ |─ ─ interface 接口文件
......@@ -150,6 +152,7 @@ $ yarn build
|─ ─ YYY-ui-logic-base.ts 应用实体界面处理逻辑文件
|─ ─ YYY-ui-logic.ts 自定义应用实体界面处理逻辑文件
|─ ─ utils 工具类文件
|─ ─ utilservice 应用功能服务
|─ ─ widgets 部件文件夹
|─ ─ appde 应用实体名称
​ |─ ─ XXX 部件名称
......
......@@ -24,6 +24,7 @@
"element-ui": "^2.13.0",
"file-saver": "^2.0.2",
"font-awesome": "^4.7.0",
"ibiz-gantt-elastic": "^1.0.8",
"interactjs": "^1.9.4",
"moment": "^2.24.0",
"path-to-regexp": "^6.1.0",
......
......@@ -81,9 +81,16 @@ export default class AppUser extends Vue {
* @memberof AppUser
*/
public logout() {
localStorage.removeItem('user');
localStorage.removeItem('token');
this.$router.push({ name: 'login' });
const get: Promise<any> = this.$http.get('v7/logout');
get.then((response:any) =>{
if (response && response.status === 200) {
localStorage.removeItem('user');
localStorage.removeItem('token');
this.$router.push({ name: 'login' });
}
}).catch((error: any) =>{
console.error(error);
})
}
}
</script>
......
<template>
<div class='view-container degridview wfgroup-grid-view'>
<div class='view-container degridview wfgroup-grid-view'>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="wfgroupgridview"></app-studioaction>
<card class='view-card ' :dis-hover="true" :bordered="false">
<p slot='title'>
......@@ -9,7 +9,7 @@
<div class='view-top-messages'>
</div>
<div style='margin-bottom: 6px;'>
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;' />
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;' placeholder="请输入组名称" />
<div class='pull-right'>
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
......
<template>
<div class='view-container degridview wfmember-grid-view'>
<div class='view-container degridview wfmember-grid-view'>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="wfmembergridview"></app-studioaction>
<card class='view-card ' :dis-hover="true" :bordered="false">
<p slot='title'>
......@@ -9,7 +9,7 @@
<div class='view-top-messages'>
</div>
<div style='margin-bottom: 6px;'>
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;' />
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;' placeholder="请输入组成员名称" />
<div class='pull-right'>
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
......
<template>
<div class='view-container degridview wfprocess-definition-grid-view'>
<div class='view-container degridview wfprocess-definition-grid-view'>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="wfprocessdefinitiongridview"></app-studioaction>
<card class='view-card ' :dis-hover="true" :bordered="false">
<p slot='title'>
......@@ -9,7 +9,7 @@
<div class='view-top-messages'>
</div>
<div style='margin-bottom: 6px;'>
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;' />
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;' placeholder="请输入流程定义名称" />
<div class='pull-right'>
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
......
<template>
<div class='view-container degridview wfuser-grid-view'>
<div class='view-container degridview wfuser-grid-view'>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="wfusergridview"></app-studioaction>
<card class='view-card ' :dis-hover="true" :bordered="false">
<p slot='title'>
......@@ -9,7 +9,7 @@
<div class='view-top-messages'>
</div>
<div style='margin-bottom: 6px;'>
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;' />
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;' placeholder="请输入用户名称" />
<div class='pull-right'>
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
......
......@@ -3626,6 +3626,11 @@ date-fns@^1.27.2:
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c"
integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==
dayjs@^1.8.16:
version "1.8.27"
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.27.tgz#a8ae63ee990af28c05c430f0e160ae835a0fbbf8"
integrity sha512-Jpa2acjWIeOkg8KURUHICk0EqnEFSSF5eMEscsOgyJ92ZukXwmpmRkPSUka7KHSfbj5eKH30ieosYip+ky9emQ==
de-indent@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d"
......@@ -5204,6 +5209,17 @@ human-signals@^1.1.1:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
ibiz-gantt-elastic@^1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/ibiz-gantt-elastic/-/ibiz-gantt-elastic-1.0.8.tgz#d7c40b6b0068a9303772594608375d42b8dbcb61"
integrity sha512-vlawRcYGiNv6N8N9Wx2ZO7oorV3R6dZWYT7Yvb2lxWfdWYX+cK1KZP0p+2S/Is1/A7+eDFhu60iZ2nf7LExaFQ==
dependencies:
dayjs "^1.8.16"
resize-observer-polyfill "^1.5.1"
vue "^2.6.10"
vue-slider-component "^3.0.40"
vue-switches "^2.0.1"
iconv-lite@0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
......@@ -8623,7 +8639,7 @@ requires-port@^1.0.0:
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=
resize-observer-polyfill@^1.5.0:
resize-observer-polyfill@^1.5.0, resize-observer-polyfill@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464"
integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==
......@@ -10115,6 +10131,13 @@ vue-loader@^15.7.2:
vue-hot-reload-api "^2.3.0"
vue-style-loader "^4.1.0"
vue-property-decorator@^8.0.0:
version "8.4.2"
resolved "https://registry.yarnpkg.com/vue-property-decorator/-/vue-property-decorator-8.4.2.tgz#016e17f259f73bc547e77a50ce282ba18db4ee41"
integrity sha512-IqbARlvgPE2pzKfbecKxsu2yEH0Wv7hfHR6m4eZA3LTnNw9hveAX77vDfLFyTeMISS5N7Kucp/xRSHjcQ6bAfQ==
dependencies:
vue-class-component "^7.1.0"
vue-property-decorator@^8.3.0:
version "8.3.0"
resolved "https://registry.yarnpkg.com/vue-property-decorator/-/vue-property-decorator-8.3.0.tgz#536f027dc7d626f37c8d85a2dc02f0a6cb979440"
......@@ -10127,6 +10150,13 @@ vue-router@^3.1.3:
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.1.4.tgz#98a6a4dd38fca0db3b9f3c04bfbd008a3b6d958d"
integrity sha512-pX2BGvZg5/MOXbJoYsRppoZM+0B4LSszvIXQvLPZ7govbgbBorYQ4JHx99lDTjzEBkbTyKfRG+ru1VCnMuVcUg==
vue-slider-component@^3.0.40:
version "3.1.3"
resolved "https://registry.yarnpkg.com/vue-slider-component/-/vue-slider-component-3.1.3.tgz#f5e61cdbd7b677840f7286ee590c6450469f71fb"
integrity sha512-SPFb1I3G2a4thIwghvVNhcvPGCUz6PIZR1ClwtvN4MT44ZUzvqCMDS7osdKz0hdKu4kfanxET8qZn826A/XPxA==
dependencies:
vue-property-decorator "^8.0.0"
vue-style-loader@^4.1.0:
version "4.1.2"
resolved "https://registry.yarnpkg.com/vue-style-loader/-/vue-style-loader-4.1.2.tgz#dedf349806f25ceb4e64f3ad7c0a44fba735fcf8"
......@@ -10135,6 +10165,13 @@ vue-style-loader@^4.1.0:
hash-sum "^1.0.2"
loader-utils "^1.0.2"
vue-switches@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/vue-switches/-/vue-switches-2.0.1.tgz#f23436259c7fe4ffca9c4a6df49ac78941e20a20"
integrity sha512-rDqBtK3TKy1pEvyZeWmnSHVeXqAcn+ozch7LiNThBzr1QMjg5rhvqBY7uWeli/baDDslf6CXmBJbHPwASJLqoA==
dependencies:
vue "^2.2.6"
vue-template-compiler@^2.6.10:
version "2.6.11"
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.6.11.tgz#c04704ef8f498b153130018993e56309d4698080"
......@@ -10148,7 +10185,7 @@ vue-template-es2015-compiler@^1.6.0, vue-template-es2015-compiler@^1.9.0:
resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825"
integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==
vue@^2.6.10:
vue@^2.2.6, vue@^2.6.10:
version "2.6.11"
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.11.tgz#76594d877d4b12234406e84e35275c6d514125c5"
integrity sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ==
......
......@@ -37,11 +37,6 @@
git clone -b master $para2 ibzwf/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzwf/
mvn clean package -Pweb
cd ibzwf-app/ibzwf-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzwf-app-web.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzwf-app-web.jar
EXPOSE 30003
EXPOSE 8080
ADD ibzwf-app-web.jar /ibzwf-app-web.jar
......@@ -3,21 +3,9 @@ services:
ibzwf-app-web:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzwf-app-web:latest
ports:
- "30003:30003"
- "8080:8080"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=30003
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
- SPRING_REDIS_HOST=172.16.100.243
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
- SPRING_DATASOURCE_PASSWORD=@6dEfb3@
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
deploy:
mode: replicated
replicas: 1
......
......@@ -56,6 +56,7 @@
<column name="FONTSIZE" type="VARCHAR2(10 BYTE)"/>
<column name="LANG" type="VARCHAR2(100 BYTE)"/>
<column name="MEMO" type="VARCHAR2(500 BYTE)"/>
<column name="SUPERUSER" type="INTEGER"/>
</createTable>
</changeSet>
<changeSet author="Think (generated)" id="1561433044682-3">
......@@ -65,6 +66,7 @@
<column name="USERNAME" value="系统管理员"/>
<column name="USERCODE" value="0100"/>
<column name="LOGINNAME" value="ibzadmin"/>
<column name="SUPERUSER" value="1"/>
<column name="PASSWORD" value="123456"/>
<column name="DOMAINS" value="100000"/>
<column name="MDEPTID"/>
......
......@@ -5,7 +5,6 @@
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<include file="changelog/20190625112530_init_ibizsys.xml" relativeToChangelogFile="true"/>
<include file="changelog/20190817112530_init_ibizsys_audit.xml" relativeToChangelogFile="true"/>
<include file="h2_table.xml" relativeToChangelogFile="true"/>
<include file="view.xml" relativeToChangelogFile="true"/>
......
{
"unires":[
],
"predefineddatarange":[{"id":"ALL","name":"全部数据"},{"id":"CURORG","name":"当前单位"},{"id":"PORG","name":"上级单位"},{"id":"SORG","name":"下级单位"},{"id":"CURORGDEPT","name":"当前部门"},{"id":"PORGDEPT","name":"上级部门"},{"id":"SORGDEPT","name":"下级部门"}],
"entities":[
{
"dename":"WFREModel",
"delogicname":"流程模型",
"sysmoudle":{"id":"WORKFLOW","name":"workflow"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}]
}
, {
"dename":"WFMember",
"delogicname":"成员",
"sysmoudle":{"id":"WORKFLOW","name":"workflow"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}]
}
, {
"dename":"WFGroup",
"delogicname":"角色/用户组",
"sysmoudle":{"id":"WORKFLOW","name":"workflow"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}]
}
, {
"dename":"WFUser",
"delogicname":"用户",
"sysmoudle":{"id":"WORKFLOW","name":"workflow"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}]
}
, {
"dename":"WFProcessDefinition",
"delogicname":"流程定义",
"sysmoudle":{"id":"WORKFLOW","name":"workflow"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}]
}
, {
"dename":"WFSystem",
"delogicname":"系统",
"sysmoudle":{"id":"WORKFLOW","name":"workflow"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}]
}
],
"appmenus":[
......
......@@ -46,9 +46,6 @@
<!-- Security -->
<spring-cloud-security.version>2.1.1.RELEASE</spring-cloud-security.version>
<!-- Activity -->
<activiti.version>7.1.0.M2</activiti.version>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
<!--logstash-logback-encoder-->
<logstash.version>5.2</logstash.version>
......@@ -63,7 +60,10 @@
<jsonwebtoken-jjwt.version>0.9.1</jsonwebtoken-jjwt.version>
<!--Liquibase数据库版本更新工具-->
<liquibase.version>3.6.3</liquibase.version>
<liquibase.version>3.8.7</liquibase.version>
<!--H2内存数据库-->
<h2.version>1.4.200</h2.version>
<!--caffeine缓存-->
<caffeine-cache.version>2.6.0</caffeine-cache.version>
......@@ -71,6 +71,9 @@
<!--反序列化工具-->
<kryo.version>4.0.2</kryo.version>
<!--httpClient -->
<openfeign-httpclient.version>11.0</openfeign-httpclient.version>
</properties>
<dependencyManagement>
......@@ -124,6 +127,13 @@
<version>${liquibase.version}</version>
</dependency>
<!-- H2 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
</dependency>
<!-- Swagger2 -->
<dependency>
<groupId>io.springfox</groupId>
......@@ -170,23 +180,6 @@
<version>${drools-version}</version>
</dependency>
<!-- Activiti -->
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-json-converter</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-image-generator</artifactId>
<version>${activiti.version}</version>
</dependency>
<!-- Error -->
<!-- Security -->
......@@ -250,6 +243,11 @@
<version>${kryo.version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>${openfeign-httpclient.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
......@@ -304,6 +302,12 @@
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<!-- H2内存库 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<!-- Error -->
<!-- Security -->
......
......@@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
@Profile("api-prod")
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class apiSecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
......
......@@ -71,7 +71,7 @@ public class WFGroupResource {
@PreAuthorize("hasPermission(#wfgroup_id,'Update',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Update-all')")
@ApiOperation(value = "Update", tags = {"WFGroup" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/{wfgroup_id}")
@Transactional
......@@ -83,7 +83,7 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(#wfgroup_id,'Update',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"WFGroup" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFGroupDTO> wfgroupdtos) {
......@@ -112,7 +112,7 @@ public class WFGroupResource {
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Create-all')")
@ApiOperation(value = "Create", tags = {"WFGroup" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups")
@Transactional
......@@ -122,8 +122,7 @@ public class WFGroupResource {
WFGroupDTO dto = wfgroupMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Create-all')")
@ApiOperation(value = "createBatch", tags = {"WFGroup" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFGroupDTO> wfgroupdtos) {
......@@ -134,7 +133,7 @@ public class WFGroupResource {
@PreAuthorize("hasPermission('Remove',{#wfgroup_id,{this.getEntity(),'Sql'}})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Remove-all')")
@ApiOperation(value = "Remove", tags = {"WFGroup" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/{wfgroup_id}")
@Transactional
......@@ -152,7 +151,7 @@ public class WFGroupResource {
@PreAuthorize("hasPermission(#wfgroup_id,'Get',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Get-all')")
@ApiOperation(value = "Get", tags = {"WFGroup" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/wfgroups/{wfgroup_id}")
public ResponseEntity<WFGroupDTO> get(@PathVariable("wfgroup_id") String wfgroup_id) {
......@@ -161,7 +160,7 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"WFGroup" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfgroups/fetchdefault")
public ResponseEntity<List<WFGroupDTO>> fetchDefault(WFGroupSearchContext context) {
......@@ -174,10 +173,10 @@ public class WFGroupResource {
.body(list);
}
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"WFGroup" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfgroups/searchdefault")
public ResponseEntity<Page<WFGroupDTO>> searchDefault(WFGroupSearchContext context) {
@RequestMapping(method= RequestMethod.POST , value="/wfgroups/searchdefault")
public ResponseEntity<Page<WFGroupDTO>> searchDefault(@RequestBody WFGroupSearchContext context) {
Page<WFGroup> domains = wfgroupService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(wfgroupMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
......
......@@ -73,7 +73,7 @@ public class WFMemberResource {
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFMember-Create-all')")
@ApiOperation(value = "Create", tags = {"WFMember" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/wfmembers")
@Transactional
......@@ -83,8 +83,7 @@ public class WFMemberResource {
WFMemberDTO dto = wfmemberMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFMember-Create-all')")
@ApiOperation(value = "createBatch", tags = {"WFMember" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/wfmembers/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFMemberDTO> wfmemberdtos) {
......@@ -95,7 +94,7 @@ public class WFMemberResource {
@PreAuthorize("hasPermission('Remove',{#wfmember_id,{this.getEntity(),'Sql'}})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFMember-Remove-all')")
@ApiOperation(value = "Remove", tags = {"WFMember" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfmembers/{wfmember_id}")
@Transactional
......@@ -129,7 +128,7 @@ public class WFMemberResource {
@PreAuthorize("hasPermission(#wfmember_id,'Update',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFMember-Update-all')")
@ApiOperation(value = "Update", tags = {"WFMember" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/wfmembers/{wfmember_id}")
@Transactional
......@@ -141,7 +140,7 @@ public class WFMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(#wfmember_id,'Update',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFMember-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"WFMember" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/wfmembers/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFMemberDTO> wfmemberdtos) {
......@@ -152,7 +151,7 @@ public class WFMemberResource {
@PreAuthorize("hasPermission(#wfmember_id,'Get',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFMember-Get-all')")
@ApiOperation(value = "Get", tags = {"WFMember" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/wfmembers/{wfmember_id}")
public ResponseEntity<WFMemberDTO> get(@PathVariable("wfmember_id") String wfmember_id) {
......@@ -161,7 +160,7 @@ public class WFMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFMember-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"WFMember" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfmembers/fetchdefault")
public ResponseEntity<List<WFMemberDTO>> fetchDefault(WFMemberSearchContext context) {
......@@ -174,10 +173,10 @@ public class WFMemberResource {
.body(list);
}
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFMember-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"WFMember" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfmembers/searchdefault")
public ResponseEntity<Page<WFMemberDTO>> searchDefault(WFMemberSearchContext context) {
@RequestMapping(method= RequestMethod.POST , value="/wfmembers/searchdefault")
public ResponseEntity<Page<WFMemberDTO>> searchDefault(@RequestBody WFMemberSearchContext context) {
Page<WFMember> domains = wfmemberService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(wfmemberMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
......@@ -299,8 +298,8 @@ public class WFMemberResource {
}
@ApiOperation(value = "searchDEFAULTByWFGroup", tags = {"WFMember" } ,notes = "searchDEFAULTByWFGroup")
@RequestMapping(method= RequestMethod.GET , value="/wfgroups/{wfgroup_id}/wfmembers/searchdefault")
public ResponseEntity<Page<WFMemberDTO>> searchWFMemberDefaultByWFGroup(@PathVariable("wfgroup_id") String wfgroup_id,WFMemberSearchContext context) {
@RequestMapping(method= RequestMethod.POST , value="/wfgroups/{wfgroup_id}/wfmembers/searchdefault")
public ResponseEntity<Page<WFMemberDTO>> searchWFMemberDefaultByWFGroup(@PathVariable("wfgroup_id") String wfgroup_id, @RequestBody WFMemberSearchContext context) {
context.setN_groupid_eq(wfgroup_id);
Page<WFMember> domains = wfmemberService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
......@@ -423,8 +422,8 @@ public class WFMemberResource {
}
@ApiOperation(value = "searchDEFAULTByWFUser", tags = {"WFMember" } ,notes = "searchDEFAULTByWFUser")
@RequestMapping(method= RequestMethod.GET , value="/wfusers/{wfuser_id}/wfmembers/searchdefault")
public ResponseEntity<Page<WFMemberDTO>> searchWFMemberDefaultByWFUser(@PathVariable("wfuser_id") String wfuser_id,WFMemberSearchContext context) {
@RequestMapping(method= RequestMethod.POST , value="/wfusers/{wfuser_id}/wfmembers/searchdefault")
public ResponseEntity<Page<WFMemberDTO>> searchWFMemberDefaultByWFUser(@PathVariable("wfuser_id") String wfuser_id, @RequestBody WFMemberSearchContext context) {
context.setN_userid_eq(wfuser_id);
Page<WFMember> domains = wfmemberService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
......
......@@ -71,7 +71,7 @@ public class WFProcessDefinitionResource {
@PreAuthorize("hasPermission(#wfprocessdefinition_id,'Update',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Update-all')")
@ApiOperation(value = "Update", tags = {"WFProcessDefinition" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/wfprocessdefinitions/{wfprocessdefinition_id}")
@Transactional
......@@ -83,7 +83,7 @@ public class WFProcessDefinitionResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(#wfprocessdefinition_id,'Update',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"WFProcessDefinition" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/wfprocessdefinitions/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFProcessDefinitionDTO> wfprocessdefinitiondtos) {
......@@ -94,7 +94,7 @@ public class WFProcessDefinitionResource {
@PreAuthorize("hasPermission(#wfprocessdefinition_id,'Get',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Get-all')")
@ApiOperation(value = "Get", tags = {"WFProcessDefinition" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/wfprocessdefinitions/{wfprocessdefinition_id}")
public ResponseEntity<WFProcessDefinitionDTO> get(@PathVariable("wfprocessdefinition_id") String wfprocessdefinition_id) {
......@@ -124,7 +124,7 @@ public class WFProcessDefinitionResource {
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Create-all')")
@ApiOperation(value = "Create", tags = {"WFProcessDefinition" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/wfprocessdefinitions")
@Transactional
......@@ -134,8 +134,7 @@ public class WFProcessDefinitionResource {
WFProcessDefinitionDTO dto = wfprocessdefinitionMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Create-all')")
@ApiOperation(value = "createBatch", tags = {"WFProcessDefinition" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/wfprocessdefinitions/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFProcessDefinitionDTO> wfprocessdefinitiondtos) {
......@@ -146,7 +145,7 @@ public class WFProcessDefinitionResource {
@PreAuthorize("hasPermission('Remove',{#wfprocessdefinition_id,{this.getEntity(),'Sql'}})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Remove-all')")
@ApiOperation(value = "Remove", tags = {"WFProcessDefinition" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfprocessdefinitions/{wfprocessdefinition_id}")
@Transactional
......@@ -161,7 +160,7 @@ public class WFProcessDefinitionResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"WFProcessDefinition" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfprocessdefinitions/fetchdefault")
public ResponseEntity<List<WFProcessDefinitionDTO>> fetchDefault(WFProcessDefinitionSearchContext context) {
......@@ -174,10 +173,10 @@ public class WFProcessDefinitionResource {
.body(list);
}
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"WFProcessDefinition" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfprocessdefinitions/searchdefault")
public ResponseEntity<Page<WFProcessDefinitionDTO>> searchDefault(WFProcessDefinitionSearchContext context) {
@RequestMapping(method= RequestMethod.POST , value="/wfprocessdefinitions/searchdefault")
public ResponseEntity<Page<WFProcessDefinitionDTO>> searchDefault(@RequestBody WFProcessDefinitionSearchContext context) {
Page<WFProcessDefinition> domains = wfprocessdefinitionService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(wfprocessdefinitionMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
......
......@@ -55,7 +55,7 @@ public class WFREModelResource {
@PreAuthorize("hasPermission(#wfremodel_id,'Update',{this.getEntity(),'None'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFREModel-Update-all')")
@ApiOperation(value = "Update", tags = {"WFREModel" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/wfremodels/{wfremodel_id}")
@Transactional
......@@ -67,7 +67,7 @@ public class WFREModelResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(#wfremodel_id,'Update',{this.getEntity(),'None'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFREModel-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"WFREModel" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/wfremodels/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFREModelDTO> wfremodeldtos) {
......@@ -94,7 +94,7 @@ public class WFREModelResource {
@PreAuthorize("hasPermission(#wfremodel_id,'Get',{this.getEntity(),'None'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFREModel-Get-all')")
@ApiOperation(value = "Get", tags = {"WFREModel" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/wfremodels/{wfremodel_id}")
public ResponseEntity<WFREModelDTO> get(@PathVariable("wfremodel_id") String wfremodel_id) {
......@@ -106,7 +106,7 @@ public class WFREModelResource {
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'None'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFREModel-Create-all')")
@ApiOperation(value = "Create", tags = {"WFREModel" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/wfremodels")
@Transactional
......@@ -116,8 +116,7 @@ public class WFREModelResource {
WFREModelDTO dto = wfremodelMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'None'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFREModel-Create-all')")
@ApiOperation(value = "createBatch", tags = {"WFREModel" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/wfremodels/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFREModelDTO> wfremodeldtos) {
......@@ -137,7 +136,7 @@ public class WFREModelResource {
@PreAuthorize("hasPermission('Remove',{#wfremodel_id,{this.getEntity(),'None'}})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFREModel-Remove-all')")
@ApiOperation(value = "Remove", tags = {"WFREModel" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfremodels/{wfremodel_id}")
@Transactional
......@@ -161,7 +160,7 @@ public class WFREModelResource {
return ResponseEntity.status(HttpStatus.OK).body(wfremodelMapping.toDto(wfremodelService.getDraft(new WFREModel())));
}
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'None'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFREModel-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"WFREModel" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfremodels/fetchdefault")
public ResponseEntity<List<WFREModelDTO>> fetchDefault(WFREModelSearchContext context) {
......@@ -174,10 +173,10 @@ public class WFREModelResource {
.body(list);
}
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'None'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFREModel-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"WFREModel" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfremodels/searchdefault")
public ResponseEntity<Page<WFREModelDTO>> searchDefault(WFREModelSearchContext context) {
@RequestMapping(method= RequestMethod.POST , value="/wfremodels/searchdefault")
public ResponseEntity<Page<WFREModelDTO>> searchDefault(@RequestBody WFREModelSearchContext context) {
Page<WFREModel> domains = wfremodelService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(wfremodelMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
......
......@@ -55,7 +55,7 @@ public class WFSystemResource {
@PreAuthorize("hasPermission('Remove',{#wfsystem_id,{this.getEntity(),'Sql'}})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Remove-all')")
@ApiOperation(value = "Remove", tags = {"WFSystem" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfsystems/{wfsystem_id}")
@Transactional
......@@ -73,7 +73,7 @@ public class WFSystemResource {
@PreAuthorize("hasPermission(#wfsystem_id,'Update',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Update-all')")
@ApiOperation(value = "Update", tags = {"WFSystem" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/wfsystems/{wfsystem_id}")
@Transactional
......@@ -85,7 +85,7 @@ public class WFSystemResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(#wfsystem_id,'Update',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"WFSystem" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/wfsystems/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFSystemDTO> wfsystemdtos) {
......@@ -121,7 +121,7 @@ public class WFSystemResource {
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Create-all')")
@ApiOperation(value = "Create", tags = {"WFSystem" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/wfsystems")
@Transactional
......@@ -131,8 +131,7 @@ public class WFSystemResource {
WFSystemDTO dto = wfsystemMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Create-all')")
@ApiOperation(value = "createBatch", tags = {"WFSystem" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/wfsystems/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFSystemDTO> wfsystemdtos) {
......@@ -152,7 +151,7 @@ public class WFSystemResource {
@PreAuthorize("hasPermission(#wfsystem_id,'Get',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Get-all')")
@ApiOperation(value = "Get", tags = {"WFSystem" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/wfsystems/{wfsystem_id}")
public ResponseEntity<WFSystemDTO> get(@PathVariable("wfsystem_id") String wfsystem_id) {
......@@ -161,7 +160,7 @@ public class WFSystemResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"WFSystem" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfsystems/fetchdefault")
public ResponseEntity<List<WFSystemDTO>> fetchDefault(WFSystemSearchContext context) {
......@@ -174,10 +173,10 @@ public class WFSystemResource {
.body(list);
}
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"WFSystem" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfsystems/searchdefault")
public ResponseEntity<Page<WFSystemDTO>> searchDefault(WFSystemSearchContext context) {
@RequestMapping(method= RequestMethod.POST , value="/wfsystems/searchdefault")
public ResponseEntity<Page<WFSystemDTO>> searchDefault(@RequestBody WFSystemSearchContext context) {
Page<WFSystem> domains = wfsystemService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(wfsystemMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
......
......@@ -55,7 +55,7 @@ public class WFUserResource {
@PreAuthorize("hasPermission('Remove',{#wfuser_id,{this.getEntity(),'Sql'}})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Remove-all')")
@ApiOperation(value = "Remove", tags = {"WFUser" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/{wfuser_id}")
@Transactional
......@@ -98,7 +98,7 @@ public class WFUserResource {
@PreAuthorize("hasPermission(#wfuser_id,'Update',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Update-all')")
@ApiOperation(value = "Update", tags = {"WFUser" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/{wfuser_id}")
@Transactional
......@@ -110,7 +110,7 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(#wfuser_id,'Update',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"WFUser" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFUserDTO> wfuserdtos) {
......@@ -121,7 +121,7 @@ public class WFUserResource {
@PreAuthorize("hasPermission(#wfuser_id,'Get',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Get-all')")
@ApiOperation(value = "Get", tags = {"WFUser" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/wfusers/{wfuser_id}")
public ResponseEntity<WFUserDTO> get(@PathVariable("wfuser_id") String wfuser_id) {
......@@ -133,7 +133,7 @@ public class WFUserResource {
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Create-all')")
@ApiOperation(value = "Create", tags = {"WFUser" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers")
@Transactional
......@@ -143,8 +143,7 @@ public class WFUserResource {
WFUserDTO dto = wfuserMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Create-all')")
@ApiOperation(value = "createBatch", tags = {"WFUser" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFUserDTO> wfuserdtos) {
......@@ -161,7 +160,7 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(wfuserService.checkKey(wfuserMapping.toDomain(wfuserdto)));
}
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"WFUser" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfusers/fetchdefault")
public ResponseEntity<List<WFUserDTO>> fetchDefault(WFUserSearchContext context) {
......@@ -174,10 +173,10 @@ public class WFUserResource {
.body(list);
}
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"WFUser" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfusers/searchdefault")
public ResponseEntity<Page<WFUserDTO>> searchDefault(WFUserSearchContext context) {
@RequestMapping(method= RequestMethod.POST , value="/wfusers/searchdefault")
public ResponseEntity<Page<WFUserDTO>> searchDefault(@RequestBody WFUserSearchContext context) {
Page<WFUser> domains = wfuserService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(wfuserMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
......
......@@ -85,5 +85,10 @@
<artifactId>springfox-swagger-ui</artifactId>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
</dependency>
</dependencies>
</project>
......@@ -32,11 +32,11 @@ public class DEFieldDefaultValueAspect
* @param point
* @throws Exception
*/
@Before(value = "execution(* com.cntmtech.support.core.*.service.*.create(..))")
@Before(value = "execution(* cn.ibizlab.core.*.service.*.create(..))")
public void BeforeCreate(JoinPoint point) throws Exception {
fillDEFieldDefaultValue(point);
}
@Before(value = "execution(* com.cntmtech.support.core.*.service.*.createBatch(..))")
@Before(value = "execution(* cn.ibizlab.core.*.service.*.createBatch(..))")
public void BeforeCreateBatch(JoinPoint point) throws Exception {
fillDEFieldDefaultValue(point);
}
......@@ -46,11 +46,11 @@ public class DEFieldDefaultValueAspect
* @param point
* @throws Exception
*/
@Before(value = "execution(* com.cntmtech.support.core.*.service.*.update(..))")
@Before(value = "execution(* cn.ibizlab.core.*.service.*.update(..))")
public void BeforeUpdate(JoinPoint point) throws Exception {
fillDEFieldDefaultValue(point);
}
@Before(value = "execution(* com.cntmtech.support.core.*.service.*.updateBatch(..))")
@Before(value = "execution(* cn.ibizlab.core.*.service.*.updateBatch(..))")
public void BeforeUpdateBatch(JoinPoint point) throws Exception {
fillDEFieldDefaultValue(point);
}
......@@ -60,11 +60,11 @@ public class DEFieldDefaultValueAspect
* @param point
* @throws Exception
*/
@Before(value = "execution(* com.cntmtech.support.core.*.service.*.save(..))")
@Before(value = "execution(* cn.ibizlab.core.*.service.*.save(..))")
public void BeforeSave(JoinPoint point) throws Exception {
fillDEFieldDefaultValue(point);
}
@Before(value = "execution(* com.cntmtech.support.core.*.service.*.saveBatch(..))")
@Before(value = "execution(* cn.ibizlab.core.*.service.*.saveBatch(..))")
public void BeforeSaveBatch(JoinPoint point) throws Exception {
fillDEFieldDefaultValue(point);
}
......
......@@ -111,4 +111,6 @@ public class IBZUSER implements Serializable{
@Size(min = 0, max = 500, message = "[备注]长度必须在[500]以内!")
private String memo;
private int superuser;
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.PageRequest;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.util.StringUtils;
......@@ -54,6 +55,7 @@ public class SearchContextBase implements ISearchContext{
/**
* 排序对象
*/
@JsonIgnore
public Sort pageSort;
/**
* 工作流步骤标识
......
......@@ -6,13 +6,11 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.util.ObjectUtils;
import java.util.Map;
import java.util.HashMap;
import java.sql.Timestamp;
import java.util.Collection;
import java.util.Set;
import java.util.*;
import com.alibaba.fastjson.JSONObject;
@Data
......@@ -58,8 +56,8 @@ public class AuthenticationUser implements UserDetails
private String memo;
private Map <String,Object> sessionParams;
@JsonIgnore
private Collection<GrantedAuthority> authorities;
@JsonIgnore
private Collection<GrantedAuthority> authorities;
private int superuser;
private JSONObject permissionList;
private String orglevel;//单位级别
......@@ -144,4 +142,15 @@ public class AuthenticationUser implements UserDetails
else
return new HashMap<>();
}
public Collection<GrantedAuthority> getAuthorities() {
if(authorities==null && permissionList !=null){
if(permissionList.getJSONArray("authorities")!=null){
authorities=new ArrayList<>();
permissionList.getJSONArray("authorities").
forEach(item->authorities.add(new SimpleGrantedAuthority(String.valueOf(item))));
}
}
return authorities;
}
}
......@@ -12,7 +12,7 @@ import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.security.core.authority.AuthorityUtils;
/**
* 实体[IBZUSER] 服务对象接口实现
*/
......@@ -44,6 +44,8 @@ public class SimpleUserService implements AuthenticationUserService{
user.setOrgid(domains);
user.setOrgcode(domains);
user.setOrgname(domains);
user.setSuperuser(1);
user.setAuthorities(AuthorityUtils.createAuthorityList("ROLE_SUPERADMIN"));
return user;
}
......
......@@ -63,6 +63,8 @@ mybatis-plus:
#阿里sentinel熔断器
feign:
httpclient:
enabled: true
sentinel:
enabled: true
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册