|
|
|
@ -125,6 +125,7 @@ class RecordDetailHandler extends Handler {
|
|
|
|
|
|
|
|
|
|
let canViewCode = rdoc.uid === this.user._id;
|
|
|
|
|
canViewCode ||= this.user.hasPriv(PRIV.PRIV_READ_RECORD_CODE);
|
|
|
|
|
canViewCode ||= this.user.hasPerm(PERM.PERM_READ_RECORD_CODE);
|
|
|
|
|
canViewCode ||= this.user.hasPerm(PERM.PERM_READ_RECORD_CODE_ACCEPT) && self?.status === STATUS.STATUS_ACCEPTED;
|
|
|
|
|
if (!canViewCode) {
|
|
|
|
|
rdoc.code = '';
|
|
|
|
@ -285,6 +286,7 @@ class RecordDetailConnectionHandler extends ConnectionHandler {
|
|
|
|
|
|
|
|
|
|
let canViewCode = rdoc.uid === this.user._id;
|
|
|
|
|
canViewCode ||= this.user.hasPriv(PRIV.PRIV_READ_RECORD_CODE);
|
|
|
|
|
canViewCode ||= this.user.hasPerm(PERM.PERM_READ_RECORD_CODE);
|
|
|
|
|
canViewCode ||= this.user.hasPerm(PERM.PERM_READ_RECORD_CODE_ACCEPT) && self?.status === STATUS.STATUS_ACCEPTED;
|
|
|
|
|
if (!canViewCode) {
|
|
|
|
|
rdoc.code = '';
|
|
|
|
|