some fixed

This commit is contained in:
FangfangZhao 2018-11-14 23:23:31 +08:00
parent a7f31dc392
commit 5e65b51b0c
7 changed files with 35 additions and 14 deletions

View file

@ -131,11 +131,11 @@ public class FormManager extends LayoutManager {
} else {
if (onView) { // for R
if (!Application.getSecurityManager().allowedR(user, record)) {
return formatModelError("没有读取此记录的权限");
return formatModelError("没有读取此记录的权限");
}
} else { // for U
if (!Application.getSecurityManager().allowedU(user, record)) {
return formatModelError("没有编辑此记录的权限");
return formatModelError("没有编辑此记录的权限");
}
}
}
@ -144,7 +144,7 @@ public class FormManager extends LayoutManager {
JSONArray elements = config.getJSONArray("elements");
if (elements == null || elements.isEmpty()) {
return formatModelError("表单布局尚未配置,请配置后使用");
return formatModelError("表单布局尚未配置,请配置后使用");
}
Record data = null;

View file

@ -135,6 +135,7 @@ public class GeneralEntityService extends BaseService {
*/
public int delete(ID record, String[] cascades) {
super.delete(record);
Application.getRecordOwningCache().cleanOwningUser(record);
int affected = 1;
@ -171,6 +172,7 @@ public class GeneralEntityService extends BaseService {
assigned.setID(EntityHelper.owningUser, (ID) toUser.getIdentity());
assigned.setID(EntityHelper.owningDept, (ID) toUser.getOwningDept().getIdentity());
super.update(assigned);
Application.getRecordOwningCache().cleanOwningUser(record);
int affected = 1;

View file

@ -73,7 +73,7 @@ public class GeneralRecordControll extends BaseControll {
return;
}
} else if (!Application.getSecurityManager().allowedU(user, record.getPrimary())) {
writeFailure(response, "没有编辑此记录的权限");
writeFailure(response, "没有编辑此记录的权限");
return;
}
@ -101,7 +101,7 @@ public class GeneralRecordControll extends BaseControll {
return;
}
if (ids.length == 1 && !Application.getSecurityManager().allowedD(user, firstId)) {
writeFailure(response, "没有删除此记录的权限");
writeFailure(response, "没有删除此记录的权限");
return;
}
@ -139,7 +139,7 @@ public class GeneralRecordControll extends BaseControll {
return;
}
if (ids.length == 1 && !Application.getSecurityManager().allowedA(user, firstId)) {
writeFailure(response, "没有分派此记录的权限");
writeFailure(response, "没有分派此记录的权限");
return;
}
@ -178,7 +178,7 @@ public class GeneralRecordControll extends BaseControll {
return;
}
if (ids.length == 1 && !Application.getSecurityManager().allowedS(user, firstId)) {
writeFailure(response, "没有共享此记录的权限");
writeFailure(response, "没有共享此记录的权限");
return;
}

View file

@ -18133,6 +18133,7 @@ form.dropzone .dz-preview .dz-error-message {
.select2-container--default .select2-selection--single .select2-selection__rendered, .select2-container--default .select2-selection--multiple .select2-selection__rendered {
padding: 0 10px;
line-height: 37px;
line-height: 35px;
font-size: 1rem;
color: #404040
}

View file

@ -116,6 +116,9 @@
margin-top: 10px;
right: 8px;
}
.adv-search .dropdown-menu.rb-scroller {
max-height: 402px;
}
.adv-search .dropdown-item {
position: relative;
cursor: pointer;
@ -191,9 +194,6 @@ body.view-body {
.select2.select2-container {
width: 100%;
}
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
line-height: 30px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
margin-top: 4px;
margin-right: 4px;
@ -213,7 +213,8 @@ a {
display: none !important;
}
.mlr-auto {
margin: 0 auto !important;
margin-left: auto !important;
margin-right: auto !important;
}
.rb-scroller {
position: relative;
@ -239,6 +240,19 @@ a {
.rbform .type-FILE {
padding-bottom: 4px !important;
}
.rbform .select2-container--default .select2-selection--multiple .select2-selection__clear {
margin-right: 20px;
}
.rbform .select2-container--default .select2-selection--multiple::after {
content: '\f1c3';
font: normal normal normal 14px/1 'Material-Design-Iconic-Font';
font-size: 1.5rem;
font-weight: 400px;
color: #aaa;
position: absolute;
right: 8px;
top: 9px;
}
.img-field {
line-height: 1;
font-size: 0;
@ -527,7 +541,8 @@ i.split.ui-draggable-dragging {
cursor: default;
}
.column-checkbox {
width: 49px;
width: 48px;
padding-right: 8px !important;
}
.column-checkbox>div {
width: 18px;
@ -913,6 +928,9 @@ i.split.ui-draggable-dragging {
padding-left: 8px;
padding-right: 8px;
}
.adv-filter .select2-container--default .select2-selection--multiple .select2-selection__rendered {
line-height: 30px;
}
.adv-filter .btn+.btn{
margin-left: 10px;
}

View file

@ -26,7 +26,7 @@
<div class="adv-search float-left">
<div class="btn-group">
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown"><span class="text-truncate J_name">所有数据</span><i class="icon zmdi zmdi-caret-down"></i></button>
<div class="dropdown-menu">
<div class="dropdown-menu rb-scroller">
<div class="dropdown-item" data-id="$ALL$"><a>所有数据</a></div>
<div class="dropdown-divider"></div>
<div class="dropdown-item J_advfilter"><i class="icon zmdi zmdi-playlist-plus"></i>添加过滤项</div>

View file

@ -45,7 +45,7 @@
</div>
<div class="col-6 pr-1 mb-2 btn-group J_new">
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown"><i class="icon zmdi zmdi-plus"></i> 新建相关</button>
<div class="dropdown-menu dropdown-menu-right">
<div class="dropdown-menu">
<div class="dropdown-divider J_for-admin hide"></div>
<a class="dropdown-item J_for-admin hide"><i class="icon zmdi zmdi-settings"></i> 配置新建</a>
</div>