Skip to content

Dev #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 42 commits into from
Dec 19, 2024
Merged

Dev #83

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
8649a29
fix user select
xlorne Dec 6, 2024
d969249
fix user select
xlorne Dec 6, 2024
7485f85
fix FlowNode buttons
xlorne Dec 6, 2024
7c99ed8
fix columnLabelMap toUpperCase
xlorne Dec 6, 2024
cf5c143
fix trySubmit bug
xlorne Dec 6, 2024
0ad954f
custom control opinionEditorVisible
xlorne Dec 6, 2024
2492e15
custom control opinionEditorVisible
xlorne Dec 7, 2024
5e705a4
custom control opinionEditorVisible
xlorne Dec 7, 2024
01258cd
custom control opinionEditorVisible
xlorne Dec 7, 2024
2374284
add FlowOpinion nodeName & nodeCode
xlorne Dec 7, 2024
7ac79dd
add FlowOpinion nodeName & nodeCode
xlorne Dec 7, 2024
a70da9a
fix code
xlorne Dec 7, 2024
41fb72e
fix code style
xlorne Dec 7, 2024
2b370a3
add SQLRunningContext#run()
xlorne Dec 9, 2024
4a04315
fix SQLRunningContext#intercept
xlorne Dec 9, 2024
08f2ed3
add test assert
xlorne Dec 9, 2024
851367b
add test assert
xlorne Dec 9, 2024
cfa4db2
add <React.StrictMode>
xlorne Dec 9, 2024
1b545ac
add EdgeType
xlorne Dec 10, 2024
1ff87ed
add resetToken
xlorne Dec 10, 2024
7ecfcde
add resetToken
xlorne Dec 10, 2024
a59736a
add MetaTable annotation
xlorne Dec 11, 2024
1c90c48
update 3.3.39
xlorne Dec 11, 2024
80a32e0
update 3.3.39
xlorne Dec 11, 2024
1996694
add SQLRunningContext#skipDataAuthorization 3.3.40
xlorne Dec 12, 2024
c4578c9
fix test
xlorne Dec 12, 2024
c8d2062
fix test
xlorne Dec 12, 2024
ebb1477
add 3.3.41
xlorne Dec 12, 2024
9516540
fix handleTrySubmitFlow validateFields
xlorne Dec 12, 2024
620f59d
fix aliaTableName null bug
xlorne Dec 17, 2024
a32eaa9
fix aliaTableName null bug
xlorne Dec 17, 2024
b3bae31
fix SelectSQLAnalyzer
xlorne Dec 18, 2024
6b6378b
fix DataAuthorization
xlorne Dec 18, 2024
a4ca886
fix DataAuthorization
xlorne Dec 18, 2024
ac3e405
fix DataAuthorization
xlorne Dec 18, 2024
db0b66f
add TableColumnAliasContext
xlorne Dec 18, 2024
c6eac20
add TableColumnAliasContext
xlorne Dec 18, 2024
c562f71
add TableColumnAliasContext
xlorne Dec 18, 2024
8bebd9f
fix 3.3.45
xlorne Dec 18, 2024
9ee2427
fix 3.3.45
xlorne Dec 18, 2024
a028eba
fix 3.3.45
xlorne Dec 19, 2024
eb3fb9a
fix 3.3.45
xlorne Dec 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add SQLRunningContext#skipDataAuthorization 3.3.40
  • Loading branch information
xlorne committed Dec 12, 2024
commit 1996694cbcb565684d01d8607227c664a3895571
2 changes: 1 addition & 1 deletion example/example-application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>springboot-example</artifactId>
<groupId>com.codingapi.springboot</groupId>
<version>3.3.39</version>
<version>3.3.40</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion example/example-domain/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>springboot-example</artifactId>
<groupId>com.codingapi.springboot</groupId>
<version>3.3.39</version>
<version>3.3.40</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion example/example-infra-flow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>springboot-example</artifactId>
<groupId>com.codingapi.springboot</groupId>
<version>3.3.39</version>
<version>3.3.40</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion example/example-infra-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>springboot-example</artifactId>
<groupId>com.codingapi.springboot</groupId>
<version>3.3.39</version>
<version>3.3.40</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion example/example-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>springboot-example</artifactId>
<groupId>com.codingapi.springboot</groupId>
<version>3.3.39</version>
<version>3.3.40</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</parent>

<artifactId>springboot-example</artifactId>
<version>3.3.39</version>
<version>3.3.40</version>

<name>springboot-example</name>
<description>springboot-example project for Spring Boot</description>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<groupId>com.codingapi.springboot</groupId>
<artifactId>springboot-parent</artifactId>
<version>3.3.39</version>
<version>3.3.40</version>

<url>https://github.com/codingapi/springboot-framewrok</url>
<name>springboot-parent</name>
Expand Down
2 changes: 1 addition & 1 deletion springboot-starter-data-authorization/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>springboot-parent</artifactId>
<version>3.3.39</version>
<version>3.3.40</version>
</parent>

<artifactId>springboot-starter-data-authorization</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public class SQLRunningContext {

private final ThreadLocal<Boolean> skipInterceptor = ThreadLocal.withInitial(() -> false);

private SQLRunningContext() {}
private SQLRunningContext() {
}

/**
* 拦截SQL
Expand All @@ -40,7 +41,7 @@ public SQLInterceptState intercept(String sql) throws SQLException {
} catch (SQLException exception) {
sqlInterceptor.afterHandler(sql, null, exception);
throw exception;
}finally {
} finally {
// 重置拦截器状态
skipInterceptor.set(false);
}
Expand All @@ -49,6 +50,19 @@ public SQLInterceptState intercept(String sql) throws SQLException {
}



/**
* 跳过数据权限拦截
* @param supplier 业务逻辑
* @return T
* @param <T> T
*/
public <T> T skipDataAuthorization(java.util.function.Supplier<T> supplier) {
try {
skipInterceptor.set(true);
return (T) supplier.get();
} finally {
skipInterceptor.set(false);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.codingapi.springboot.authorization.entity.User;
import com.codingapi.springboot.authorization.filter.DefaultDataAuthorizationFilter;
import com.codingapi.springboot.authorization.handler.Condition;
import com.codingapi.springboot.authorization.interceptor.SQLRunningContext;
import com.codingapi.springboot.authorization.mask.ColumnMaskContext;
import com.codingapi.springboot.authorization.mask.impl.BankCardMask;
import com.codingapi.springboot.authorization.mask.impl.IDCardMask;
Expand Down Expand Up @@ -182,6 +183,7 @@ public boolean supportColumnAuthorization(String tableName, String columnName, O
userRepository.save(bob);
userRepository.save(tom);

assertEquals(3, SQLRunningContext.getInstance().skipDataAuthorization(()->userRepository.findAll()).size());

CurrentUser.getInstance().setUser(bob);

Expand Down
2 changes: 1 addition & 1 deletion springboot-starter-data-fast/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>springboot-parent</artifactId>
<groupId>com.codingapi.springboot</groupId>
<version>3.3.39</version>
<version>3.3.40</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion springboot-starter-flow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>springboot-parent</artifactId>
<groupId>com.codingapi.springboot</groupId>
<version>3.3.39</version>
<version>3.3.40</version>
</parent>

<name>springboot-starter-flow</name>
Expand Down
2 changes: 1 addition & 1 deletion springboot-starter-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>springboot-parent</artifactId>
<groupId>com.codingapi.springboot</groupId>
<version>3.3.39</version>
<version>3.3.40</version>
</parent>

<artifactId>springboot-starter-security</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion springboot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>springboot-parent</artifactId>
<version>3.3.39</version>
<version>3.3.40</version>
</parent>
<artifactId>springboot-starter</artifactId>

Expand Down