mirror of
https://github.com/hs-web/hsweb-framework.git
synced 2026-06-06 14:15:50 +08:00
优化权限控制
This commit is contained in:
@@ -82,7 +82,7 @@ public class OwnCreatedDataAccessHandler implements DataAccessHandler {
|
||||
QueryService<RecordCreationEntity, Object> queryService =
|
||||
((QueryController<RecordCreationEntity, Object, Entity>) controller).getService();
|
||||
RecordCreationEntity oldData = queryService.selectByPk(id);
|
||||
if (oldData != null &&context.getAuthentication().getUser().getId().equals(oldData.getCreatorId())) {
|
||||
if (oldData != null && !context.getAuthentication().getUser().getId().equals(oldData.getCreatorId())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user