Skip to content

EspoCRM – Open Source CRM Application

Fix frontend permission check for user stream panel

Yurii0e4a021e02bb
diff --git a/client/src/views/user/record/detail-bottom.js b/client/src/views/user/record/detail-bottom.js
index fbf4d096b9..ae6681c883 100644
--- a/client/src/views/user/record/detail-bottom.js
+++ b/client/src/views/user/record/detail-bottom.js
@@ -35,15 +35,15 @@ class UserDetailBottomRecordView extends DetailBottomRecordView {
const userModel = /** @type {import('models/user').default} */ this.model;
- const streamAllowed = this.getAcl().checkPermission('userCalendar', userModel);
+ const streamAllowed = this.getAcl().checkPermission('user', userModel);
if (
!streamAllowed &&
- this.getAcl().getPermissionLevel('userCalendar') === 'team' &&
+ this.getAcl().getPermissionLevel('user') === 'team' &&
!this.model.has('teamsIds')
) {
this.listenToOnce(this.model, 'sync', () => {
- if (this.getAcl().checkPermission('userCalendar', userModel)) {
+ if (this.getAcl().checkPermission('user', userModel)) {
this.onPanelsReady(() => {
this.showPanel('stream', 'acl');
});