优化权限控制

This commit is contained in:
zhouhao
2017-08-17 21:16:03 +08:00
parent c42e492751
commit 653d079382
4 changed files with 8 additions and 10 deletions

View File

@@ -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;
}
}