mirror of
https://github.com/steedos/steedos-platform
synced 2024-11-22 08:10:50 +00:00
Update object.ts
This commit is contained in:
parent
d6184f1883
commit
345f8b0392
@ -1110,6 +1110,7 @@ export class SteedosObjectType extends SteedosObjectProperties {
|
||||
const userObjectFields = objectConfig.fields;
|
||||
_.each(objectConfig.permissions.field_permissions, (field_permission, field) => {
|
||||
const { read, edit } = field_permission;
|
||||
if (userObjectFields[field]) {
|
||||
if (read) {
|
||||
userObjectFields[field].hidden = false;
|
||||
userObjectFields[field].omit = true;
|
||||
@ -1125,6 +1126,7 @@ export class SteedosObjectType extends SteedosObjectProperties {
|
||||
if (!read && !edit) {
|
||||
delete userObjectFields[field]
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
objectConfig.fields = userObjectFields
|
||||
|
Loading…
Reference in New Issue
Block a user