Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.

Fix livechat bridge#429

Merged
d-gubert merged 1 commit into
alphafrom
fix/livechat-permission
Jun 29, 2021
Merged

Fix livechat bridge#429
d-gubert merged 1 commit into
alphafrom
fix/livechat-permission

Conversation

@d-gubert

Copy link
Copy Markdown
Member

What? ⛵

Fix wrong permission validation for livechat bridge

Why? 🤔

It's a fix. It's self explanatory

Links 🌎

PS 👀

@cuonghuunguyen

cuonghuunguyen commented Jun 29, 2021

Copy link
Copy Markdown
Contributor

Hi, could u cover the the bug in #430 also pls?

@d-gubert d-gubert marked this pull request as ready for review June 29, 2021 21:23
@d-gubert d-gubert merged commit 44bac3f into alpha Jun 29, 2021
@d-gubert

Copy link
Copy Markdown
Member Author

Hey @cuonghuunguyen ! This fix covers exactly that bug :)

@cuonghuunguyen

Copy link
Copy Markdown
Contributor

Thank you very much!

@felipetomm

Copy link
Copy Markdown

Hi @d-gubert !
I think that issue persist partially. We have Apps runing in RocketChat 3.16.1 and 3.15.3 enterprise.
For example, an specific method getLivechatDepartmentByIdOrName, used for Omnichannel Apps, like Whatsapp and Telegram, run normally in the server on version 3.15.3, but in 3.16.1, the result from this method is undefined.

Please, can you review this?

@cuonghuunguyen

Copy link
Copy Markdown
Contributor

Thats because while refactoring, they didnt add all permissions into defaultPermission

@felipetomm

Copy link
Copy Markdown

Hmm, but i think the permission of that method is livechat-department, right?
Has any way to adjust this without an RC release? I try add this in my App.json, but has no success:

...
"implements": [
        "IPostLivechatRoomStarted"
    ],
    "permissions": [
        {
            "name": "livechat-department.read"
        }
    ]
}

@felipetomm

Copy link
Copy Markdown

Ok.. with server logs, i find the correct permission: livechat-department.multiple, and that's ok for my App.
But, with external Apps, the solution is an Apps-Engine fix?

@d-gubert

d-gubert commented Jul 1, 2021

Copy link
Copy Markdown
Member Author

@felipetomm the livechat-department.multiple permission is only required for grabbing multiple departments with the getDepartmentsEnabledWithAgents method, other methods should work with ´livechat-department.read` as well. EDIT: I've found the problem regarding this, and you're right, this PR only solved it partially.

Regarding the difference in the apps, we'll be reviewing that.

@cuonghuunguyen the list of default permissions hasn't changed with the refactoring. But new permissions introduced after the permission system was implemented will not be part of this permission set. Currently, we have 2 permissions that are not default, IIRC: cloud.workspace-token and livechat-department.multiple

@felipetomm

Copy link
Copy Markdown

Thanks @d-gubert !

@murtaza98

murtaza98 commented Jul 6, 2021

Copy link
Copy Markdown
Contributor

Hi @d-gubert !
I think that issue persist partially. We have Apps runing in RocketChat 3.16.1 and 3.15.3 enterprise.
For example, an specific method getLivechatDepartmentByIdOrName, used for Omnichannel Apps, like Whatsapp and Telegram, run normally in the server on version 3.15.3, but in 3.16.1, the result from this method is undefined.

Please, can you review this?

Hey guys, this should be fixed with this PR: RocketChat/Rocket.Chat#22587
It's currently under review and if all goes well, it will be released with the next core release

@d-gubert d-gubert deleted the fix/livechat-permission branch May 2, 2024 21:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants