mirror of
https://github.com/hs-web/hsweb-framework.git
synced 2026-06-20 19:46:05 +08:00
优化数据权限
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package org.hswebframework.web.authorization.access;
|
||||
|
||||
|
||||
/**
|
||||
* 和user关联的实体
|
||||
*
|
||||
* @author zhouhao
|
||||
* @since 3.0.6
|
||||
*/
|
||||
public interface UserAttachEntity {
|
||||
String userId = "userId";
|
||||
|
||||
String getUserId();
|
||||
|
||||
void setUserId(String userId);
|
||||
|
||||
default String getUserIdProperty() {
|
||||
return userId;
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,6 @@ public @interface RequiresDataAccess {
|
||||
/**
|
||||
* @return permission id ,如果为空将继承 {@link Authorize#permission()}
|
||||
* @see Permission#getId()
|
||||
*
|
||||
*/
|
||||
String permission() default "";
|
||||
|
||||
@@ -82,4 +81,9 @@ public @interface RequiresDataAccess {
|
||||
*/
|
||||
boolean ignore() default false;
|
||||
|
||||
/**
|
||||
* @return 进行控制的实体类类型
|
||||
* @since 3.0.6
|
||||
*/
|
||||
Class entityType() default Void.class;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ package org.hswebframework.web.authorization.define;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author zhouhao
|
||||
* @see org.hswebframework.web.authorization.annotation.RequiresDataAccess
|
||||
*/
|
||||
@@ -14,6 +13,8 @@ public interface DataAccessDefinition extends Serializable {
|
||||
|
||||
String getIdParameterName();
|
||||
|
||||
Class getEntityType();
|
||||
|
||||
Phased getPhased();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user